/ postgrest reverse proxy

This commit is contained in:
fro
2025-10-29 03:14:54 -05:00
parent 5d7e04907a
commit abf14a0060

View File

@@ -22,13 +22,11 @@ server {
# return 301 $scheme://op.fo$request_uri;
#}
# ...
# upstream configuration
# upstream configuration for postgrest (used as reversed proxy)
upstream postgrest {
server localhost:3000;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
@@ -45,16 +43,16 @@ server {
server_name fw.op.fo;
# redirect 404 not found to the root
location / {
error_page 404 = @myownredirect;
}
#location / {
# error_page 404 = @myownredirect;
#}
location @myownredirect {
return 302 /;
}
# postgrest reverse proxy
location /rpc/ {
location / {
default_type application/json;
proxy_hide_header Content-Location;
add_header Content-Location /rpc/$upstream_http_content_location;