traefik: add cors

This commit is contained in:
notohh 2023-10-27 12:33:05 -04:00
parent 05583e3c15
commit cb6ef9c31a
Signed by: notohh
GPG key ID: BD47506D475EE86D

View file

@ -33,6 +33,11 @@
redirectscheme.scheme = "https"; redirectscheme.scheme = "https";
redirectscheme.permanent = true; redirectscheme.permanent = true;
}; };
cors = {
headers = {
accessControlAllowOriginList = "https://daphbot.notohh.dev";
};
};
}; };
routers = { routers = {
api = { api = {
@ -117,6 +122,7 @@
service = "forgejo"; service = "forgejo";
tls.domains = [{main = "*.flake.sh";}]; tls.domains = [{main = "*.flake.sh";}];
tls.certresolver = "production"; tls.certresolver = "production";
middlewares = "cors";
}; };
rustypaste-insecure = { rustypaste-insecure = {
rule = "Host(`i.flake.sh`)"; rule = "Host(`i.flake.sh`)";