TrueChartsClone/charts/stable/nextcloud/templates
VictorienXP 769a6890e3
fix(nextcloud): Fix .well-known redirections (#9979)
**Description**
There is an issue with the Nextcloud Social app:
![.well-known/webfinger isn't properly set
up!](https://github.com/truecharts/charts/assets/1633366/4670d2e8-bace-4999-b22f-f370b5c27f0c)
I've looked into it and found the cause to be most likely the Nginx
configuration.
You can see here the redirection doesn't take into account any GET
parameters:

![image](https://github.com/truecharts/charts/assets/1633366/ff6217ea-c34d-495c-aeec-9a29bb6189f4)
So it will always respond `{"message":"webfinger not supported"}`.

![image](https://github.com/truecharts/charts/assets/1633366/7b21acd3-fa26-4621-92fe-a6a63ec50196)
But when I try with a non-existent `.well-known`, I can see the
redirection works as intended.

![image](https://github.com/truecharts/charts/assets/1633366/87e38144-c0e2-4f4c-b1a6-38fd0ad22d71)
So my conclusion is that these redirections needs to be removed.

**⚙️ 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?**
To test if the fix is effective you need to first install the Social app
then test with your own user the url like this (replace
`nextcloud-domain` and `AccountName` with correct values):
https://nextcloud-domain/.well-known/webfinger?resource=acct:@AccountName@nextcloud-domain
(the Social app should give you the Federated Cloud ID directly so you
can use it there)
Then it should give an output different than `{"message":"webfinger not
supported"}`.
And the ".well-known/webfinger isn't properly set up!" should not
appear.

**📃 Notes:**
The last line `return 301 /index.php$request_uri;` should already cover
any redirection and works properly.

**✔️ Checklist:**

- [x] ⚖️ My code follows the style guidelines of this project
- [x] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [x] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [x] ⬆️ 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`
2023-06-27 15:34:57 +03:00
..
NOTES.txt
_configmap.tpl fix(nextcloud): Fix .well-known redirections (#9979) 2023-06-27 15:34:57 +03:00
_cronjobs.tpl
_ingressInjector.tpl
_initPerms.tpl
_validation.tpl
_waitNextcloud.tpl
common.yaml