Skip to content

Commit

Permalink
See #8. Docker HSTS support and nginx upgrade.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarman committed Nov 7, 2018
1 parent 8ebe810 commit b2f9f80
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Start with nginx alpine
FROM nginx:1.14-alpine
FROM nginx:1.15-alpine
# Copy nginx configuration file(s)
COPY etc/nginx/*.conf /etc/nginx/conf.d/
# Remove default nginx configuration file
Expand Down
13 changes: 8 additions & 5 deletions etc/nginx/spa.conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Basic NGINX configuration for a Single-Page Application (SPA)
server {
listen 80;
server_name localhost;
listen 80 default_server;
listen [::]:80 default_server;

# HSTS - Add HSTS header to all responses
add_header Strict-Transport-Security "max-age=600; includeSubDomains" always;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
root /usr/share/nginx/html;
index index.html index.htm;

# This try_files statement facilitates SPA framework routing
try_files $uri $uri/ /index.html;
try_files $uri $uri/ /index.html;
}
}

0 comments on commit b2f9f80

Please sign in to comment.