Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
chore: Fixes nginx routing for the design-system app.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomheller committed Jul 7, 2020
1 parent 138cb87 commit 5fa82b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .deployment/barista/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ pipeline {
# Build next section of the design system
node \
--max_old_space_size=8192 \
./node_modules/.bin/ng run next:build:production-internal
./node_modules/.bin/ng run next:build:production-internal --base-href='/next/'
fi
cat dist/barista-data/routes.txt
Expand Down
14 changes: 8 additions & 6 deletions .deployment/barista/nginx/sites-available/barista-internal.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ server {
server_name localhost;

index index.html;
root /var/www/barista;

# security headers
add_header X-Frame-Options "SAMEORIGIN" always;
Expand All @@ -19,12 +18,15 @@ server {
deny all;
}

# location /next {
# root /var/www/next;
# try_files $uri $uri/ /index.html;
# }
location ~ ^/next(/)? {
root /var/www/next/;
# https://stackoverflow.com/a/41629576
rewrite ^/next/(.*) /$1 break;
try_files $uri /next/index.html;
}

location / {
location ~ / {
root /var/www/barista;
try_files $uri $uri/ /index.html;
}

Expand Down

0 comments on commit 5fa82b0

Please sign in to comment.