VEGAS/ipfs: subdomain gateway
BUG: ipfs config cannot escape domain dots, thus the following cannot be applied with it: PublicGateways.${domain} = { UseSubdomains = true; Paths = [ "/ipfs" "/ipns" ]; };
This commit is contained in:
parent
355abdd072
commit
736467f600
1 changed files with 25 additions and 0 deletions
|
@ -94,4 +94,29 @@ in
|
|||
};
|
||||
};
|
||||
services.oauth2_proxy.nginx.virtualHosts = [ "ipfs.admin.${domain}" ];
|
||||
|
||||
inherit (tools.acme.dns01) age;
|
||||
|
||||
security.acme.certs."ipfs.${domain}" = {
|
||||
domain = "*.ipfs.${domain}";
|
||||
extraDomainNames = [ "*.ipns.${domain}" ];
|
||||
dnsProvider = "rfc2136";
|
||||
group = "nginx";
|
||||
inherit (tools.acme.dns01) credentialsFile;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."ipfs.${domain}" = vhosts.basic // {
|
||||
serverName = "~^(.+)\.(ip[fn]s)\.${domain}$";
|
||||
enableACME = false;
|
||||
useACMEHost = "ipfs.${domain}";
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://127.0.0.1:48280";
|
||||
extraConfig = ''
|
||||
add_header X-Content-Type-Options "";
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue