You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Request: I need to access to the original URL, before any redirects.
But, up to this day, after the redirect, the original URL is lost.
Possible solution (modifying your code):
(Extension) Create a new map using id as key.
(Extension) Make that _makeDetails() stores the url in the map if no previous value for that id.
(Extension) Make that _makeDetails() reads the value from that map and add it into a new key "originalUrl".
(User) Use value.originalUrl in my Modify Headers Custom Function.
(Extension) Free memory using a similar mechanism as _autoDeleteSavedHeader().
This is my use case:
Some site forces me to send "Referer" request header (403 otherwise). So adding to the url something similar to "&forceHeader=https%3A%2F%2Fwww.annoyingsite.com". Then using your extension to add the header based on the query string. But that site also answers 403 if the URL is somehow different to the original, including my "alien" query string.
So, using your extension to remove the "alien" query string. But no longer available to the modify headers custom function (detail variable has now the new URL).
Couldn't find a workaround without modifying your extension.
The text was updated successfully, but these errors were encountered:
fvsnippets
changed the title
[REQJ]
[Request] Access to the original URL, before any redirects
Jun 29, 2020
There were some other complications: i.e. media server serves partial content, aka "206", implying new requestIds (so a second map was needed, using the stripped out url as key and the original requestId as value). And sometimes was redirecting me to a new -different- url (so needed to listen to the redirect being executed).
But managed to solve it with the aid of session storage and by adding an onBeforeRedirect listener. So anyone with enough knowledge and imagination can solve the use case raised with out needing to modify the extension.
Of course having the original url available through the complete process woud be cool, but it would involve adding quite a bit of complexity to extension. So, closing my request.
Request: I need to access to the original URL, before any redirects.
But, up to this day, after the redirect, the original URL is lost.
Possible solution (modifying your code):
This is my use case:
Some site forces me to send "Referer" request header (403 otherwise). So adding to the url something similar to "&forceHeader=https%3A%2F%2Fwww.annoyingsite.com". Then using your extension to add the header based on the query string. But that site also answers 403 if the URL is somehow different to the original, including my "alien" query string.
So, using your extension to remove the "alien" query string. But no longer available to the modify headers custom function (detail variable has now the new URL).
Couldn't find a workaround without modifying your extension.
The text was updated successfully, but these errors were encountered: