w (wip)
This commit is contained in:
@@ -71,13 +71,15 @@ server {
|
|||||||
|
|
||||||
# normal mode: /shortcode
|
# normal mode: /shortcode
|
||||||
location /\w+ {
|
location /\w+ {
|
||||||
|
#rewrite ^/your_endpoint(.*)$ /your_backend_endpoint?args=$args break;
|
||||||
|
#rewrite ^ /your_backend_endpoint?args=$args break;
|
||||||
default_type application/json;
|
default_type application/json;
|
||||||
proxy_hide_header Content-Location;
|
proxy_hide_header Content-Location;
|
||||||
add_header Content-Location /rpc/$upstream_http_content_location;
|
add_header Content-Location /rpc/$upstream_http_content_location;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_method post;
|
proxy_method post;
|
||||||
proxy_pass http://postgrest/rpc/fwd;
|
proxy_pass http://postgrest/rpc/fwd?args=$args;
|
||||||
proxy_set_body $args;
|
proxy_set_body $args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user