l paste: allow CORS

This commit is contained in:
lassulus 2021-08-25 12:05:35 +02:00
parent bb846b5ca9
commit 33714185ea

View file

@ -31,6 +31,10 @@ with import <stockholm/lib>;
proxy_pass http://127.0.0.1:${toString config.krebs.htgen.imgur.port};
proxy_pass_header Server;
'';
extraConfig = ''
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
'';
};
services.nginx.virtualHosts."p.krebsco.de" = {
enableACME = true;
@ -51,6 +55,10 @@ with import <stockholm/lib>;
proxy_pass http://127.0.0.1:${toString config.krebs.htgen.imgur.port};
proxy_pass_header Server;
'';
extraConfig = ''
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
'';
};
krebs.htgen.paste = {