{"id":2266,"date":"2013-07-06T13:24:13","date_gmt":"2013-07-06T11:24:13","guid":{"rendered":"https:\/\/sgaul.de\/?p=2266"},"modified":"2014-03-13T21:41:08","modified_gmt":"2014-03-13T20:41:08","slug":"nginx-proxy-pass-unterschlagt-query-parameter","status":"publish","type":"post","link":"https:\/\/sgaul.de\/2013\/07\/06\/nginx-proxy-pass-unterschlagt-query-parameter\/","title":{"rendered":"Nginx: Proxy-Pass unterschl\u00e4gt Query-Parameter"},"content":{"rendered":"
Folgende Einstellung verursachte, dass beim Zielserver keine Query-Parameter ankamen:<\/p>\n
location ~ ^\/(assets|pages)\/ {\r\n proxy_pass http:\/\/127.0.0.1:3030\/$uri;\r\n}<\/pre>\nhttp:\/\/localhost\/assets\/x\/y?p=1\r\n=> http:\/\/localhost:3030\/assets\/x\/y<\/pre>\nEinfach das
\/$uri<\/code> weglassen, dann wird der komplette Pfad mit Query-Parametern \u00fcbergeben:<\/p>\n
location ~ ^\/(assets|pages)\/ {\r\n proxy_pass http:\/\/127.0.0.1:3030;\r\n}<\/pre>\nhttp:\/\/localhost\/assets\/x\/y?p=1\r\n=> http:\/\/localhost:3030\/assets\/x\/y?p=1<\/pre>\n","protected":false},"excerpt":{"rendered":"Folgende Einstellung verursachte, dass beim Zielserver keine Query-Parameter ankamen: location ~ ^\/(assets|pages)\/ { proxy_pass http:\/\/127.0.0.1:3030\/$uri; } http:\/\/localhost\/assets\/x\/y?p=1 => http:\/\/localhost:3030\/assets\/x\/y Einfach das \/$uri weglassen, dann wird der komplette Pfad mit Query-Parametern \u00fcbergeben: location ~ ^\/(assets|pages)\/ { proxy_pass http:\/\/127.0.0.1:3030; } http:\/\/localhost\/assets\/x\/y?p=1 => http:\/\/localhost:3030\/assets\/x\/y?p=1<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[91],"tags":[536],"_links":{"self":[{"href":"https:\/\/sgaul.de\/wp-json\/wp\/v2\/posts\/2266"}],"collection":[{"href":"https:\/\/sgaul.de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sgaul.de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sgaul.de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sgaul.de\/wp-json\/wp\/v2\/comments?post=2266"}],"version-history":[{"count":9,"href":"https:\/\/sgaul.de\/wp-json\/wp\/v2\/posts\/2266\/revisions"}],"predecessor-version":[{"id":2544,"href":"https:\/\/sgaul.de\/wp-json\/wp\/v2\/posts\/2266\/revisions\/2544"}],"wp:attachment":[{"href":"https:\/\/sgaul.de\/wp-json\/wp\/v2\/media?parent=2266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sgaul.de\/wp-json\/wp\/v2\/categories?post=2266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sgaul.de\/wp-json\/wp\/v2\/tags?post=2266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}