Add mailhog proxy on hikari
This commit is contained in:
parent
1afd29b2b0
commit
0c98cf5144
|
@ -4,6 +4,8 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./web-development/mailhog.localhost.nix
|
||||
|
||||
./web-development/daniel-siepmann.localhost.nix
|
||||
];
|
||||
|
||||
|
|
25
systems/hikari/web-development/mailhog.localhost.nix
Normal file
25
systems/hikari/web-development/mailhog.localhost.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
let
|
||||
domain = "mailhog.localhost";
|
||||
in {
|
||||
services = {
|
||||
httpd.virtualHosts.${domain} = {
|
||||
# TODO: Add SSL
|
||||
# forceSSL = true;
|
||||
# addSSL = true;
|
||||
extraConfig = ''
|
||||
RequestHeader unset Authorization
|
||||
ProxyRequests Off
|
||||
ProxyPreserveHost On
|
||||
ProxyPass / http://localhost:8025/
|
||||
ProxyPassReverse / http://localhost:8025/
|
||||
|
||||
# Mailhog specific
|
||||
<LocationMatch /api/v2/websocket>
|
||||
ProxyPass ws://localhost:8025/api/v2/websocket
|
||||
</LocationMatch>
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue