Skip to content

Commit

Permalink
EDGECLOUD-5824 Web server version information disclosed in error pages (
Browse files Browse the repository at this point in the history
#1158)

Override default nginx config and set "server_tokens off" in the prod
console image.
  • Loading branch information
venkytv committed Mar 25, 2022
1 parent 34b2b87 commit 3db6dac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ RUN npm run build

FROM nginx:stable

COPY docker-nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /edge-cloud-ui/build /usr/share/nginx/html
16 changes: 16 additions & 0 deletions docker-nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
server {
listen 80;
listen [::]:80;
server_name localhost;
server_tokens off;

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

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

0 comments on commit 3db6dac

Please sign in to comment.