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; -# } - }