Skip to content

Commit

Permalink
fixed nginx.conf files which did reverse proxying wrongly for /api/2/…
Browse files Browse the repository at this point in the history
…connections and others

Co-authored-by: Stanchev Aleksandar <aleksandar.stanchev@bosch.io>

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
  • Loading branch information
thjaeckle authored and Stanchev Aleksandar committed Sep 26, 2022
1 parent cefe97e commit b50555e
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 24 deletions.
15 changes: 10 additions & 5 deletions deployment/docker/nginx.conf
Expand Up @@ -38,12 +38,17 @@ http {
location /api/2/connections {
include nginx-cors.conf;

proxy_pass http://gateway:8080/api/2/connnections;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
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-Forwarded-User $remote_user;

proxy_set_header Connection '';
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
}

# api
Expand All @@ -53,7 +58,7 @@ http {
auth_basic "Authentication required";
auth_basic_user_file nginx.htpasswd;

proxy_pass http://gateway:8080/api;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down Expand Up @@ -90,7 +95,7 @@ http {
location /health {
include nginx-cors.conf;

proxy_pass http://gateway:8080/health;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -114,7 +119,7 @@ http {
location /stats {
include nginx-cors.conf;

proxy_pass http://gateway:8080/stats;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -126,7 +131,7 @@ http {
location /devops {
include nginx-cors.conf;

proxy_pass http://gateway:8080/devops;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down
21 changes: 13 additions & 8 deletions deployment/docker/sandbox/nginx.conf
Expand Up @@ -56,7 +56,7 @@ http {
location /status {
include nginx-cors.conf;

proxy_pass http://gateway:8080/status;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -75,7 +75,7 @@ http {
auth_basic $authentication;
auth_basic_user_file nginx.htpasswd;

proxy_pass http://gateway:8080/api;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -94,7 +94,7 @@ http {
auth_basic $authentication;
auth_basic_user_file nginx.htpasswd;

proxy_pass http://gateway:8080/ws;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down Expand Up @@ -155,12 +155,17 @@ http {
location /api/2/connections {
include nginx-cors.conf;

proxy_pass http://gateway:8080/api/2/connnections;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
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-Forwarded-User $remote_user;

proxy_set_header Connection '';
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
}

# api
Expand All @@ -170,7 +175,7 @@ http {
auth_basic $authentication;
auth_basic_user_file nginx.htpasswd;

proxy_pass http://gateway:8080/api;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -189,7 +194,7 @@ http {
auth_basic $authentication;
auth_basic_user_file nginx.htpasswd;

proxy_pass http://gateway:8080/ws;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down Expand Up @@ -224,7 +229,7 @@ http {
location /stats {
include nginx-cors.conf;

proxy_pass http://gateway:8080/stats;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -236,7 +241,7 @@ http {
location /devops {
include nginx-cors.conf;

proxy_pass http://gateway:8080/devops;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down
15 changes: 10 additions & 5 deletions deployment/kubernetes/deploymentFiles/nginx/nginx.conf
Expand Up @@ -31,12 +31,17 @@ http {
location /api/2/connections {
include nginx-cors.conf;

proxy_pass http://gateway:8080/api/2/connnections;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
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-Forwarded-User $remote_user;

proxy_set_header Connection '';
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
}

# api
Expand All @@ -46,7 +51,7 @@ http {
auth_basic "Authentication required";
auth_basic_user_file nginx.htpasswd;

proxy_pass http://gateway:8080/api;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -65,7 +70,7 @@ http {
auth_basic "Restricted";
auth_basic_user_file nginx.htpasswd;

proxy_pass http://gateway:8080/ws;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -83,7 +88,7 @@ http {
location /health {
include nginx-cors.conf;

proxy_pass http://gateway:8080/health;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -107,7 +112,7 @@ http {
location /devops {
include nginx-cors.conf;

proxy_pass http://gateway:8080/devops;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down
17 changes: 11 additions & 6 deletions deployment/openshift/nginx/nginx.conf
Expand Up @@ -29,12 +29,17 @@ http {
location /api/2/connections {
include nginx-cors.conf;

proxy_pass http://gateway:8080/api/2/connnections;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
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-Forwarded-User $remote_user;

proxy_set_header Connection '';
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
}

# api
Expand All @@ -44,7 +49,7 @@ http {
auth_basic "Authentication required";
auth_basic_user_file /opt/app-root/etc/nginx.default.d/nginx.htpasswd;

proxy_pass http://gateway:8080/api;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -63,7 +68,7 @@ http {
auth_basic "Restricted";
auth_basic_user_file /opt/app-root/etc/nginx.default.d/nginx.htpasswd;

proxy_pass http://gateway:8080/ws;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -81,7 +86,7 @@ http {
location /health {
include nginx-cors.conf;

proxy_pass http://gateway:8080/health;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -105,7 +110,7 @@ http {
location /stats {
include nginx-cors.conf;

proxy_pass http://gateway:8080/stats;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -117,7 +122,7 @@ http {
location /devops {
include nginx-cors.conf;

proxy_pass http://gateway:8080/devops;
proxy_pass http://gateway:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down

0 comments on commit b50555e

Please sign in to comment.