From abf14a0060cb2689fe6a650e15e791742aece66c Mon Sep 17 00:00:00 2001 From: fro Date: Wed, 29 Oct 2025 03:14:54 -0500 Subject: [PATCH] / postgrest reverse proxy --- cfg/ngx/fw.op.fo.conf | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/cfg/ngx/fw.op.fo.conf b/cfg/ngx/fw.op.fo.conf index 3b5f261..b5e9747 100644 --- a/cfg/ngx/fw.op.fo.conf +++ b/cfg/ngx/fw.op.fo.conf @@ -22,12 +22,10 @@ server { # return 301 $scheme://op.fo$request_uri; #} - # ... - # upstream configuration - upstream postgrest { +# upstream configuration for postgrest (used as reversed proxy) +upstream postgrest { server localhost:3000; - } - +} server { 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;