Send Forgejo token as header instead of url paramter #22

Closed
opened 2026-11-03 19:36:35 +01:00 by Leon Schmidt · 3 comments
Owner

URL paramter values are often logged, but for compatibility, both should be supported.

URL paramter values are often logged, but for compatibility, both should be supported.
Author
Owner

@cloudy Can you do this pls?

@cloudy Can you do this pls?
Collaborator

Got it - I'll look at the code, switch token handling to prefer an Authorization: Bearer header, and keep the URL parameter as a fallback for compatibility. Expect a PR soon.

Got it - I'll look at the code, switch token handling to prefer an `Authorization: Bearer` header, and keep the URL parameter as a fallback for compatibility. Expect a PR soon.
Collaborator

Done - implemented in PR #26.

Summary:

  • deploy and delete now read the Forgejo token from the Authorization: Bearer <token> header first.
  • The access_token query parameter is still supported as a fallback for compatibility.
  • Added unit tests for the new extractAccessToken helper and getParams.
  • All existing tests pass (go test ./...).
Done - implemented in PR #26. Summary: - `deploy` and `delete` now read the Forgejo token from the `Authorization: Bearer <token>` header first. - The `access_token` query parameter is still supported as a fallback for compatibility. - Added unit tests for the new `extractAccessToken` helper and `getParams`. - All existing tests pass (`go test ./...`).
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
leon/Forge-Pages#22
No description provided.