feat(website): proxy WKD to ProtonMail
This commit is contained in:
parent
2077f87f54
commit
8e1499e211
|
@ -22,6 +22,7 @@ in with builtins; {
|
|||
./services/jellyfin.nix
|
||||
./services/etebase.nix
|
||||
./services/website.nix
|
||||
./services/wkd.nix
|
||||
./services/home-assistant
|
||||
./services/matrix
|
||||
./services/watchtower.nix
|
||||
|
@ -77,6 +78,7 @@ in with builtins; {
|
|||
passwordFile = config.age.secrets.cloudflare.path;
|
||||
domains = [
|
||||
"felschr.com"
|
||||
"openpgpkey.felschr.com"
|
||||
"home.felschr.com"
|
||||
"esphome.felschr.com"
|
||||
"matrix.felschr.com"
|
||||
|
|
32
services/wkd.nix
Normal file
32
services/wkd.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Direct mode
|
||||
services.nginx.virtualHosts."felschr.com" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/.well-known/openpgpkey/" = {
|
||||
recommendedProxySettings = false;
|
||||
proxyPass = "https://openpgpkey.protonmail.ch";
|
||||
extraConfig = ''
|
||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||
proxy_set_header Host $proxy_host;
|
||||
rewrite /.well-known/openpgpkey/(.*) /.well-known/openpgpkey/$host/$1 break;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# Advanced mode
|
||||
services.nginx.virtualHosts."openpgpkey.felschr.com" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/.well-known/openpgpkey/felschr.com/" = {
|
||||
recommendedProxySettings = false;
|
||||
proxyPass = "https://openpgpkey.protonmail.ch";
|
||||
extraConfig = ''
|
||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||
proxy_set_header Host $proxy_host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue