Caldav URL should have a domain prefix if the API URL starts with /API/v1 #1763
Labels
No Label
dependencies
duplicate
help wanted
invalid
kind/bug
kind/feature
needs reproduction
question
security
wontfix
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: vikunja/vikunja#1763
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Was trying to figure out why the caldav textbox under settings keeps showing:
/dav/principals/{USERNAME}/
. And not prepending my custom domain before that link.Did some searching and came to the lines here:
https://kolaente.dev/vikunja/frontend/src/branch/master/src/views/user/Settings.vue#L420-L421
And saw that it was based on API_URL. Which when I check in browser is
/api/v1
.So followed the instructions here: https://vikunja.io/docs/install-frontend/#api-url-configuration-in-docker. But noticed the problem was still occuring.
Looked into the
run.sh
script to see the replacement for the environment variable. And it looks like the logic is a bit out of sync. So I ran the container directly to see what the file looks like at/usr/share/nginx/html/index.html
without runningrun.sh
.So did:
docker run --rm -it vikunja/frontend sh
cat /usr/share/nginx/html/index.html
And this is the block that seems relevant:
But the it seems the
sed
inrun.sh
is expecting there to behttp://localhost:3456/api/v1
in there.So I manually entered my custom domain into that line and it filled the caldav link correctly.
API_URL ignored by run.shto VIKUNJA_API_URL ignored by run.shThat'll fix it temporaily, but the modifications will be gone once you restart the container.
The
localhost...
part isn't present in the file anymore because sed already replaced it. I think the real problem is the caldav URL needs to the domain of the current URL if the API URL starts with/api/...
.VIKUNJA_API_URL ignored by run.shto Caldav URL should have a domain prefix if the API URL starts with /API/v1That could also be a solution.
But just for debugging, the
localhost
is not already gone. By running that docker command,sh
replaces theCMD
set by theDockerfile
. So therun.sh
is not ran in that instance.From https://docs.docker.com/engine/reference/builder/#cmd:
Looks like I misread that
docker run
fordocker exec
- my bad.The docs about
CMD
you cited explain why the url is not replaced correctly when you debug it withdocker run
.Replacing the url seems to work though:
I've fixed the missing url prefix in
db90a8cde4
- feel free to reopen if the problem isn't solved.Cool. I will retest with new version. Thanks!
So this should be fixed if I understand the issue correctly?
Because it doesn't seem so :/
What version are you using? This seems to work fine on try:
latest - 0.18.2 - as always
I think I need to open a feature request to gitea to add project-specific information to ones profile, so people don't have to state their version in every issue.
Did you configure an api url?
There are issue templates which could be used for that.
Not explicitly, no - but it works with the default, so why doesn't it display the default there either?
With issue templates I still have to reiterate my info on every issue, see https://github.com/go-gitea/gitea/issues/20291
It should work with the default, yes. Can you check if it works with the unstable build?