/ postgrest reverse proxy
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user