From 58741ef22488c8a62f58b2dd1839f852c2e0292a Mon Sep 17 00:00:00 2001 From: arcoast <81871508+arcoast@users.noreply.github.com> Date: Mon, 1 Apr 2024 21:32:46 +0100 Subject: [PATCH 1/2] Add Traefik CORS Example Testing and working with Traefik v2.11.0. --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 8e3e52db..ca5d5afb 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,30 @@ server { } ``` +### Traefik example +Add this middleware to your Invidious instance: +```yaml +http: + middlewares: + materialious: + headers: + accessControlAllowCredentials: true + accessControlAllowOrigin: "https://materialious.example.com" + accessControlAllowMethods: + - GET + - POST + - OPTIONS + - HEAD + - PATCH + - PUT + - DELETE + accessControlAllowHeaders: + - User-Agent + - Authorization + - Content-Type +``` + + ### Other Please open a PR request or issue if you implement this in a different reverse proxy. From d6ebc7275a604e77df9552828ed5eff91657f06a Mon Sep 17 00:00:00 2001 From: arcoast <81871508+arcoast@users.noreply.github.com> Date: Mon, 1 Apr 2024 21:44:50 +0100 Subject: [PATCH 2/2] Fix parameter `accessControlAllowOriginList:` --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index ca5d5afb..00437efe 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ http: materialious: headers: accessControlAllowCredentials: true - accessControlAllowOrigin: "https://materialious.example.com" + accessControlAllowOriginList: "https://materialious.example.com" accessControlAllowMethods: - GET - POST @@ -111,7 +111,6 @@ http: - Content-Type ``` - ### Other Please open a PR request or issue if you implement this in a different reverse proxy.