feat(website): proxy WKD to ProtonMail
This commit is contained in:
parent
2077f87f54
commit
8e1499e211
2 changed files with 34 additions and 0 deletions
services
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…
Add table
Add a link
Reference in a new issue