when proxing url like this one
http://xxx.xxx/test?e=123&token=xxx-xxx:xxx-xxx=
the server got the url /ajax?e=123 without the token(a base64 like value)
and I wrote such js to fix it
request.queries = {}
for (const [k, v] of [...new URLSearchParams(new URL(url).search)]) {
request.queries[k] = v
}
it works,and then I got another problem
the server need a url in this format
http://xxx.xxx/test?aaa&bbb=123
but the proxy changed the url into
http://xxx.xxx/test?aaa=&bbb=123
the extra "=" make the response data invalid because the server may parse the url by regex.
is there any way to directly return the url string I computed or just return the origin url without any changes?
when proxing url like this one
http://xxx.xxx/test?e=123&token=xxx-xxx:xxx-xxx=
the server got the url/ajax?e=123
without the token(a base64 like value)and I wrote such js to fix it
it works,and then I got another problem the server need a url in this format
http://xxx.xxx/test?aaa&bbb=123
but the proxy changed the url intohttp://xxx.xxx/test?aaa=&bbb=123
the extra "=" make the response data invalid because the server may parse the url by regex. is there any way to directly return the url string I computed or just return the origin url without any changes?