/ postgrest wip

This commit is contained in:
fro
2025-10-29 03:28:06 -05:00
parent abf14a0060
commit e531b784ce

View File

@@ -53,13 +53,28 @@ server {
# postgrest reverse proxy
location / {
error_page 404 = @myownredirect;
}
# support /string url style
location ~ ^/(\w+) {
# # make the response singular
# proxy_set_header Accept 'application/vnd.pgrst.object+json';
# assuming an upstream named "postgrest"
proxy_pass http://postgrest/$1?id=eq.$2;
default_type application/json;
proxy_hide_header Content-Location;
add_header Content-Location /rpc/$upstream_http_content_location;
#proxy_set_header Connection "";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_pass http://postgrest/;
}
proxy_pass http://postgrest/rpc/fwd?p_shortcode=$1;
#http://178.156.192.201:3000/rpc/fwd?p_shortcode=ph25&p_dbg=false
}
}