From 7b41108981c0b61bffaf15b81c3db9ba97017767 Mon Sep 17 00:00:00 2001 From: fro Date: Wed, 29 Oct 2025 06:12:09 -0500 Subject: [PATCH] / this might be working MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit † --- cfg/ngx/fw.op.fo.conf | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/cfg/ngx/fw.op.fo.conf b/cfg/ngx/fw.op.fo.conf index 99102a6..0a748c6 100644 --- a/cfg/ngx/fw.op.fo.conf +++ b/cfg/ngx/fw.op.fo.conf @@ -78,32 +78,11 @@ server { add_header Content-Location /rpc/$upstream_http_content_location; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; - proxy_method POST; # note, that if writing 'post' (lowercase) instead of 'POST' (uppercase), that will lead to the postgrest error "cannot use the post method on rpc" -# set $query_string $args; -# proxy_set_body $query_string; - -#https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_set_body - -proxy_set_body '{"p_shortcode": "$1", "p_dbg": "true"}'; - - + # note, that if writing 'post' (lowercase) instead of 'POST' (uppercase), that will lead to the postgrest error "cannot use the post method on rpc" + proxy_method POST; + # https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_set_body + proxy_set_body '{"p_shortcode": "$1", "p_dbg": "false"}'; proxy_pass http://postgrest; } - # normal mode: /shortcode -# location ~ ^/\w+ { -# #rewrite ^/your_endpoint(.*)$ /your_backend_endpoint?args=$args break; -# #rewrite ^ /your_backend_endpoint?args=$args break; -# default_type application/json; -# proxy_hide_header Content-Location; -# add_header Content-Location /rpc/$upstream_http_content_location; -# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -# proxy_http_version 1.1; -# proxy_method post; -## proxy_pass http://postgrest/rpc/fwd?args=$args; -## proxy_pass http://postgrest/rpc/fwd; -# proxy_pass http://postgrest; -# proxy_set_body $args; -# } - }