Skip to content

Instantly share code, notes, and snippets.

@ferhatbostanci
Created February 17, 2021 15:37
Show Gist options
  • Save ferhatbostanci/54b9ef2502ba011eb79103ca0a96131d to your computer and use it in GitHub Desktop.
Save ferhatbostanci/54b9ef2502ba011eb79103ca0a96131d to your computer and use it in GitHub Desktop.
Mailcatcher with Nginx Reverse Proxy
server {
location /mailcatcher {
proxy_pass http://127.0.0.1:1080/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 1d;
sub_filter 'src="/' 'src="/mailcatcher/';
sub_filter 'href="/' 'href="/mailcatcher/';
sub_filter 'url(/' 'url(/mailcatcher/';
sub_filter '"/messages' '"/mailcatcher/messages';
sub_filter_types text/css application/javascript application/json;
sub_filter_once off;
}
}
@HooFoo
Copy link

HooFoo commented Aug 1, 2022

Thanks a lot!

@rolfschmidt
Copy link

thx ๐Ÿš€

@AdrienGiboire
Copy link

Thank you! ๐Ÿ™Œ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment