feat(ingressAdvanced): use tc-opencors-chain if allow-cors is enabled (#13240)
**Description** <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. --> ⚒️ Allows for the optional use of the existing Traefik CORS setup for Apps as CORS is required to use the official [jellyfin-vue client](https://github.com/jellyfin/jellyfin-vue). Has been updated to rely on https://github.com/truecharts/library-charts/pull/530 **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [x] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** Manually edited the chart's files on my own TrueNas Scale Server. Checked that jellyffin was using the tf-opencors-chain in Traefik rather than basic-chain and ensured I could connect to jellyfin via a custom app of [jellyfin-vue client](https://github.com/jellyfin/jellyfin-vue) when the added config was enabled but not if disabled. <img width="447" alt="Evidence of the correct chain being used in Traefik" src="https://github.com/truecharts/charts/assets/9092863/19a44a4e-fe95-4659-998b-753f4c4dbb4b"> <br> <img width="213" alt="Added config option" src="https://github.com/truecharts/charts/assets/9092863/a254c469-add2-49bf-85da-d0d17b371d7a"> **📃 Notes:** <!-- Please enter any other relevant information here --> This PR uses the same cors middleware setup as the existing [audiobookshelf](https://github.com/truecharts/charts/tree/eec761785c474f47dc76124f0d2491d16bf60715/charts/stable/audiobookshelf) app to ensure conistancy. While it may be expected that the `tf-opencors-headers` middleware could be added within the UI this unfortunately results in the `Access-Control-Allow-Origin` header still being missing as the common chain conflicts. **✔️ Checklist:** - [x] ⚖️ My code follows the style guidelines of this project - [x] 👀 I have performed a self-review of my own code - [x] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [x] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Signed-off-by: Michael Walter Van Der Velden <mikevdv@vandie.co.uk>
This commit is contained in:
committed by
GitHub
parent
1eb7f23896
commit
7d15dc372f
@@ -97,4 +97,4 @@ workload:
|
||||
|
||||
# -- enable Jellyfin autodiscovery on LAN
|
||||
autodiscovery:
|
||||
enabled: false
|
||||
enabled: false
|
||||
@@ -12,6 +12,12 @@
|
||||
default: websecure
|
||||
show_if: [["advanced", "=", true]]
|
||||
required: true
|
||||
- variable: allowCors
|
||||
label: "Allow Cross Origin Requests"
|
||||
schema:
|
||||
type: boolean
|
||||
show_if: [["advanced", "=", true]]
|
||||
default: false
|
||||
- variable: ingressClassName
|
||||
label: (Advanced/Optional) IngressClass Name
|
||||
schema:
|
||||
|
||||
@@ -27,6 +27,12 @@
|
||||
schema:
|
||||
type: string
|
||||
default: ""
|
||||
- variable: allowCors
|
||||
label: "Allow Cross Origin Requests"
|
||||
schema:
|
||||
type: boolean
|
||||
show_if: [["advanced", "=", true]]
|
||||
default: false
|
||||
- variable: hosts
|
||||
label: Hosts
|
||||
schema:
|
||||
|
||||
Reference in New Issue
Block a user