Skip to content

Commit

Permalink
Implemented nginx http redirect to https
Browse files Browse the repository at this point in the history
  • Loading branch information
eltonplima committed Jul 10, 2018
1 parent 27988a1 commit 3d14e67
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,8 @@ staticfiles/

# OS
.DS_Store

# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml
4 changes: 4 additions & 0 deletions docker/bothub-nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ server {
listen 80 default_server;
listen [::]:80 default_server;

if ($http_x_forwarded_proto = 'http') {
return 301 https://$host$request_uri;
}

root /tmp/bothub-webapp/dist;
index index.html;

Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.3'

services:
bothub:
image: ${DOCKER_IMAGE_NAME:-ilha/bothub}:${TAG:-latest}
image: ${BOTHUB_IMAGE_NAME:-ilha/bothub}:${TAG:-latest}
build:
context: ..
dockerfile: docker/Dockerfile
Expand Down

0 comments on commit 3d14e67

Please sign in to comment.