0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-01 19:29:45 -05:00
forgejo/modules/activitypub
Gergely Nagy cd17eb0fa7
activitypub: Sign the Host header too
Mastodon with `AUTHORIZED_FETCH` enabled requires the `Host` header to
be signed too, add it to the default for `setting.Federation.GetHeaders`
and `setting.Federation.PostHeaders`.

For this to work, we need to sign the request later: not immediately
after `NewRequest`, but just before sending them out with `client.Do`.
Doing so also lets us use `setting.Federation.GetHeaders` (we were using
`.PostHeaders` even for GET requests before).

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-08-04 23:57:48 +02:00
..
client.go activitypub: Sign the Host header too 2024-08-04 23:57:48 +02:00
client_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
main_test.go
user_settings.go
user_settings_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00