Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

Commit

Permalink
feat: simplify nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
cadriel committed Jan 25, 2021
1 parent 78cf1ec commit 08d7b05
Showing 1 changed file with 2 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,6 @@ server {
add_header Cache-Control "no-store, no-cache, must-revalidate";
}

location /printer {
proxy_pass http://apiserver/printer;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
}

location /api {
proxy_pass http://apiserver/api;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
}

location /access {
proxy_pass http://apiserver/access;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
}

location /websocket {
proxy_pass http://apiserver/websocket;
proxy_http_version 1.1;
Expand All @@ -66,22 +42,14 @@ server {
proxy_read_timeout 86400;
}

location /machine {
proxy_pass http://apiserver/machine;
location ~ ^/(printer|api|access|machine|server)/ {
proxy_pass http://apiserver$request_uri;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
}

location /server {
proxy_pass http://apiserver/server;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
}

location /webcam/ {
proxy_pass http://mjpgstreamer/;
}
Expand Down

0 comments on commit 08d7b05

Please sign in to comment.