From f3fae104bc1b21de261a65ce4fbf65e3b7d91b37 Mon Sep 17 00:00:00 2001 From: "sa.choudhary" Date: Fri, 12 Jan 2024 10:48:32 -0700 Subject: [PATCH] remove internal rewrite check --- internal/mode/static/nginx/modules/src/httpmatches.js | 9 +-------- .../mode/static/nginx/modules/test/httpmatches.test.js | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/internal/mode/static/nginx/modules/src/httpmatches.js b/internal/mode/static/nginx/modules/src/httpmatches.js index 1f36ae57e..0fcf5ef21 100644 --- a/internal/mode/static/nginx/modules/src/httpmatches.js +++ b/internal/mode/static/nginx/modules/src/httpmatches.js @@ -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) { diff --git a/internal/mode/static/nginx/modules/test/httpmatches.test.js b/internal/mode/static/nginx/modules/test/httpmatches.test.js index ac020abba..65685ea33 100644 --- a/internal/mode/static/nginx/modules/test/httpmatches.test.js +++ b/internal/mode/static/nginx/modules/test/httpmatches.test.js @@ -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 = [