feat(clickTtHttpPageRoutes): add meta-refresh URL rewriting for proxy handling
- Implemented a new function to rewrite meta-refresh URLs in HTML, ensuring redirects after login are routed through the proxy while maintaining session integrity. - Updated the proxy GET and POST endpoints to include the new meta-refresh handling, enhancing the overall functionality of the proxy interactions. - Improved error handling in the new function to ensure robustness in processing HTML content.
This commit is contained in:
@@ -97,6 +97,7 @@ export default {
|
||||
const clubId = ref('');
|
||||
const directUrl = ref('');
|
||||
const iframeSrc = ref('');
|
||||
const sessionId = ref('');
|
||||
|
||||
const canLoad = computed(() => {
|
||||
if (pageType.value === 'url') {
|
||||
@@ -124,11 +125,13 @@ export default {
|
||||
params.set('clubId', clubId.value.trim());
|
||||
}
|
||||
}
|
||||
if (sessionId.value) params.set('sid', sessionId.value);
|
||||
return `${base}?${params.toString()}`;
|
||||
}
|
||||
|
||||
function loadPage() {
|
||||
if (!canLoad.value) return;
|
||||
sessionId.value = crypto.randomUUID?.() || `s${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
||||
iframeSrc.value = buildProxyUrl();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user