Redirector
Redirector copied to clipboard
[fr] Activate redirect for GET after a POST redirect
If you do a POST request that returns a 3xx redirect, the add-on thinks that the following GET is actually a POST request and ignores it.
function checkRedirects(details) {
//We only allow GET request to be redirected, don't want to accidentally redirect
//sensitive POST parameters
if (details.method != 'GET') {
return {};
}
...
If this is the case, details.method
is indeed POST
, but details.originalUrl
is not null
anymore and the request to the Location: xxx
header is done over a GET request. If this is 100% the case, the script should perform the redirect if originalUrl
is set.