-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d403201
commit 47189eb
Showing
2 changed files
with
9 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 7 additions & 11 deletions
18
.infra/files/configs/reverse_proxy/locations/70_smtp.conf.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
location /smtp/ { | ||
set $upstream http://smtp:8025/; | ||
proxy_pass $upstream; | ||
|
||
# Websocket configuration | ||
# See: | ||
# - https://www.nginx.com/blog/websocket-nginx/ | ||
# - https://github.com/mailhog/MailHog/issues/117 | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection $connection_upgrade; | ||
location ~ ^/smtp/(.*)$ { | ||
set $upstream http://smtp:8025; | ||
proxy_pass $upstream/$1$is_args$args; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-Host $server_name; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} |