Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API endpoints responding with login page #330

Open
jakejoh opened this issue Nov 27, 2024 · 0 comments
Open

API endpoints responding with login page #330

jakejoh opened this issue Nov 27, 2024 · 0 comments

Comments

@jakejoh
Copy link

jakejoh commented Nov 27, 2024

when calling API endpoints, the serer reponds with the login page.
Calling the endpoint in a browser (logged in) works as expected, however :)
I suspect the commit bbecd7d to be the reason.

the log:

{
  "time": "2024-11-27T09:21:36.536800314Z",
  "level": "INFO",
  "msg": "Incoming request",
  "app": "workout-tracker",
  "version": "master",
  "sha": "7c61a8bd9d3d806143dc8da0d84eaa38aa1f5ac7",
  "module": "webserver",
  "request": {
    "host": "myhost.tdl",
    "ip": "2a01:239:2f9:6f00::1",
    "length": 0,
    "method": "GET",
    "params": {},
    "path": "/api/v1/whoami",
    "query": "apikey=REDACTED",
    "referer": "",
    "route": "/api/v1/whoami",
    "time": "2024-11-27T09:21:36.536635123Z"
  },
  "response": {
    "latency": 148256,
    "length": 0,
    "status": 302,
    "time": "2024-11-27T09:21:36.536783379Z"
  }
}

plus a WARN log entry

{
  "time": "2024-11-27T09:21:36.536695782Z",
  "level": "WARN",
  "msg": "error validating user",
  "app": "workout-tracker",
  "version": "master",
  "sha": "7c61a8bd9d3d806143dc8da0d84eaa38aa1f5ac7",
  "module": "app",
  "error": "invalid JWT token"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant