tried reverse proxying with nginx to get around cross domain security problemen with basex, not working
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
worker_processes 1;
|
||||
|
||||
events { worker_connections 1024; }
|
||||
|
||||
http {
|
||||
upstream docker-api {
|
||||
server basex:8984;
|
||||
}
|
||||
upstream docker-client {
|
||||
server client:8988;
|
||||
}
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-NginX-Proxy true;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $server_name;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
root /var/www/html;
|
||||
index index.html;
|
||||
charset utf-8;
|
||||
server_name dev.gdp.fr;
|
||||
|
||||
access_log on;
|
||||
error_log /var/log/nginx/error.log error;
|
||||
|
||||
sendfile off;
|
||||
|
||||
client_max_body_size 100m;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ index.html;
|
||||
}
|
||||
|
||||
location /api {
|
||||
rewrite ^/api/(.*) /$1 break;
|
||||
proxy_redirect off;
|
||||
proxy_pass http://docker-api;
|
||||
}
|
||||
|
||||
location /client {
|
||||
rewrite ^/client/(.*) /$1 break;
|
||||
proxy_redirect off;
|
||||
proxy_pass http://docker-client;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user