From 51f27dba7b9aa3bbaf417cddec0bcd09ead3c47e Mon Sep 17 00:00:00 2001 From: fro Date: Wed, 29 Oct 2025 03:11:03 -0500 Subject: [PATCH] + postgrest info (wip) --- cfg/ngx/fw.op.fo.conf | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/cfg/ngx/fw.op.fo.conf b/cfg/ngx/fw.op.fo.conf index 234e132..9c772ad 100644 --- a/cfg/ngx/fw.op.fo.conf +++ b/cfg/ngx/fw.op.fo.conf @@ -22,6 +22,15 @@ server { # return 301 $scheme://op.fo$request_uri; #} +http { + # ... + # upstream configuration + upstream postgrest { + server localhost:3000; + } +} + + server { listen 443 ssl; listen [::]:443 ssl; @@ -45,4 +54,16 @@ server { location @myownredirect { return 302 /; } + + # postgrest reverse proxy + location /rpc/ { + 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/; + } + }