Skip to content

Commit a390344

Browse files
committed
TRUNK-6413: Move redirects to gateway
1 parent afde04d commit a390344

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

frontend/nginx.conf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ http {
2020
root /usr/share/nginx/html;
2121
index index.html;
2222

23-
# redirect to home
24-
location = / {
25-
return 301 /home;
26-
}
27-
2823
# never cache the service-worker
2924
location ~* service-worker\.js$ {
3025
expires -1d;

gateway/default.conf.template

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,24 @@ server {
7676
# all redirects are relative to the gateway
7777
absolute_redirect off;
7878

79-
location = /openmrs/spa {
80-
return 301 /openmrs/spa/;
81-
}
82-
8379
location /openmrs/spa/ {
8480
proxy_pass http://frontend/;
85-
proxy_redirect http://$host/ /openmrs/spa/;
8681
}
8782

8883
location /openmrs {
8984
proxy_read_timeout 300s;
9085
proxy_pass http://backend;
9186
}
9287

88+
location = /openmrs/spa/ {
89+
return 301 /openmrs/spa/home;
90+
}
91+
92+
location = /openmrs/spa {
93+
return 301 /openmrs/spa/home;
94+
}
95+
9396
location = / {
94-
return 301 /openmrs/spa/;
97+
return 301 /openmrs/spa/home;
9598
}
9699
}

0 commit comments

Comments
 (0)