This commit is contained in:
fro
2025-10-29 05:51:53 -05:00
parent 262f71bc8f
commit 0cd0cbb49a

View File

@@ -74,15 +74,16 @@ server {
# https://stackoverflow.com/questions/53353572/proxy-pass-cannot-have-uri-part-in-location-given-by-regular-expression # https://stackoverflow.com/questions/53353572/proxy-pass-cannot-have-uri-part-in-location-given-by-regular-expression
location ~ ^/([A-Za-z0-9]+) { location ~ ^/([A-Za-z0-9]+) {
rewrite ^/([A-Za-z0-9]+) /rpc/fwd?p_shortcode=$1&p_dbg=true break; # rewrite ^/([A-Za-z0-9]+) /rpc/fwd?p_shortcode=$1&p_dbg=true break;
default_type application/json; rewrite ^/([A-Za-z0-9]+) /rpc/fwd break;
proxy_hide_header Content-Location; default_type application/json;
add_header Content-Location /rpc/$upstream_http_content_location; proxy_hide_header Content-Location;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; add_header Content-Location /rpc/$upstream_http_content_location;
proxy_http_version 1.1; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#proxy_method post; proxy_http_version 1.1;
#proxy_set_body $args; #proxy_method post;
proxy_pass http://postgrest; #proxy_set_body $args;
proxy_pass http://postgrest;
} }
# normal mode: /shortcode # normal mode: /shortcode