Skip to content

Commit

Permalink
Merge pull request #1067 from ORCID/feature/nginx_rewrite_rule_update
Browse files Browse the repository at this point in the history
updated nginx rewrite rule
  • Loading branch information
jthomas-orcid authored Dec 18, 2023
2 parents 5211feb + 675ed8c commit 8eecdcb
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions ui/container-files/etc/nginx/conf.d/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,15 @@ server {
root /usr/share/nginx/html;
index index.html index.htm;

# Redirect requests for "/ui/(.*)" to Angular application in the preferred language of the browser
rewrite ^/ui/(.*) /$accept_language/$1 break;
# Redirect requests for "/ui or /ui/(.*)" to the Angular application in the preferred language of the browser
rewrite ^/ui/?(.*)$ /$accept_language/$1 break;

# Everything under the Angular application is always redirected to Angular in the correct language
# Ensure that everything under the Angular application is always redirected to Angular in the correct language
# For reference on multi language support see: https://angular.io/guide/i18n-common-deploy#configure-a-server
location ~ ^/(cs|de|es|fr|it|ja|ko|pt|ru|ui|zh-CN|zh-TW) {
location ~ ^/($accept_language) {
try_files $uri $uri/ /$1/index.html?$args;
}

# Can use this line below instead of the location stanza above
# Everything under the Angular application is always redirected to Angular in the correct language
#try_files $uri $uri/ /$accept_language/index.html?$args;
}

}
Expand Down

0 comments on commit 8eecdcb

Please sign in to comment.