Skip to content

Commit

Permalink
remove internal rewrite check
Browse files Browse the repository at this point in the history
  • Loading branch information
salonichf5 committed Jan 16, 2024
1 parent d5343ac commit f3fae10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 1 addition & 8 deletions internal/mode/static/nginx/modules/src/httpmatches.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,7 @@ function redirect(r) {
return;
}

// If performing a rewrite, $request_uri won't be used,
// so we have to preserve args in the internal redirect.
let args = qs.stringify(r.args);
if (args) {
args = '?' + args;
}

r.internalRedirect(match.redirectPath + args);
r.internalRedirect(match.redirectPath);
}

function extractMatchesFromRequest(r) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ describe('redirect', () => {
method: 'GET',
headers: ['header1:value1', 'header2:value2'],
params: ['Arg1=value1', 'arg2=value2=SOME=other=value'],
redirectPath: '/a-match',
redirectPath: '/a-match?Arg1=value1&arg2=value2%3DSOME%3Dother%3Dvalue',
};

const tests = [
Expand Down

0 comments on commit f3fae10

Please sign in to comment.