go-vikunja / vikunja

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

Can't access API routes #95

Closed MBeggiato closed 7 months ago

MBeggiato commented 8 months ago

Description

I use vikunja 0.20.4 (But the issue is also with 0.21.0). It runs on docker 24,0,5 and behind my nginx proxy manager (I found the config here) In daily usage, all works just fine. But when I try to use the api, I get a 404 for certain routes:

/api/v1/info runs fine:

2023-11-10T13:18:58.311507242Z: WEB     ▶ 169.254.1.1:47742  GET 200 /api/v1/info 187.482µs - Proxyscotch/1.1

/api/v1/projects doesn't work:

2023-11-10T13:20:42.221104215Z: WEB     ▶ 169.254.1.1:54931  GET 404 /api/v1/projects 117.681µs - Proxyscotch/1.1

Curl for this error:

curl --request GET \
  --url https://taskapi.gmx.de.com/api/v1/projects \
  --header 'Authorization: Bearer <My Token>' \
  --header 'Content-Type: '

/api/v1/tasks/all works fine too:

  2023-11-10T13:23:56.190811479Z: WEB     ▶ 169.254.1.1:18787  GET 200 /api/v1/tasks/all 7.465818ms - Proxyscotch/1.1

Curl for this:

curl --request GET \
  --url https://taskapi.gmx.de.com/api/v1/tasks/all \
  --header 'Authorization: Bearer <My Token>' \
  --header 'Content-Type: '

Put /api/v1/projects/1/tasks doesn't work either

2023-11-10T13:26:22.249524122Z: WEB     ▶ 169.254.1.1:38202  PUT 404 /api/v1/projects/1/tasks 113.361µs - Proxyscotch/1.1

Curl for this:

curl --request PUT \
  --url https://taskapi.gmx.de.com/api/v1/projects/1/tasks \
  --header 'Authorization: Bearer <My Token>' \
  --header 'Content-Type: ' \
  --data '{
    "title":"Test"
}'

Any ideas?

Vikunja Frontend Version

0.20.4 & 0.21.0

Vikunja API Version

0.20.4 & 0.21.0

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

No response

kolaente commented 8 months ago

The api shouldn't care if you're accessing it by using the frontend or with a curl command or something else entirely.

Can you reproduce this on try?

MBeggiato commented 7 months ago

No, sadly I cant. On try it all works just fine. Might be something on my end then. Could it be related to my proxy?

MBeggiato commented 7 months ago

Okay so I just re-deployed the whole setup, using the docker-compose.yml from here. Now im using the provided nginx and nginx.conf and it works just fine! Probably something to do with my Nginx Proxy Manager setup..

tdzz1102 commented 7 months ago

The same error without nginx.