go-vikunja / vikunja

Mirror of vikunja from https://code.vikunja.io/api
GNU Affero General Public License v3.0
1.02k stars 70 forks source link

Protocol agnostic VIKUNJA_SERVICE_PUBLICURL #342

Closed DaCHack closed 4 weeks ago

DaCHack commented 4 weeks ago

Description

When running Vikunja in docker you need to specify the VIKUNJA_SERVICE_PUBLICURL environment variable.

I have a setup now that currently would allow HTTP (native) and HTTPS (via traefik) connections to Vikunja.

But it seems I can only set this environment variable to either one of these protocols which does not allow for a dual protocol setup.

Vikunja Version

0.24.3

Browser and version

Brave Version 1.71.114 Chromium: 130.0.6723.58

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

No response

kolaente commented 4 weeks ago

It needs a protocol to construct a valid link. If there would be two urls, how would it decide which one to use? If we'd remove the protocol and only use the domain, how should it figure out which protocol to use? (We can't rely on the current protocol because that won't work in async events like email sending)

And, why do you need to access Vikunja via http, when you have an https deployment set up as well?

DaCHack commented 4 weeks ago

Hmm tough one. I would need to understand these async events better. What is the actual issue here?

As for the use case: First and foremost changing from HTTP to HTTPS on a running system is a breaking change for all users this way. In my case I am not able to migrate all users in an automated way. There can also be other reasons to having both ways: Lets say you want to have a HTTP-fallback in case there is an issue with traefik. There could be other reasons as well...

kolaente commented 4 weeks ago

Hmm tough one. I would need to understand these async events better. What is the actual issue here?

Async events happen without someone making an http request, so no protocol is available at that time.

As the use case seems to be quite an edge case, I don't think we can easily support multiple public urls.