Skip to content

Return 401s when logged out of more activitypub api endpoints#750

Merged
slothful-vassal merged 7 commits intoopen-wanderer:mainfrom
RobertClarke64:401-profile-api
Jan 31, 2026
Merged

Return 401s when logged out of more activitypub api endpoints#750
slothful-vassal merged 7 commits intoopen-wanderer:mainfrom
RobertClarke64:401-profile-api

Conversation

@RobertClarke64
Copy link
Contributor

@RobertClarke64 RobertClarke64 commented Jan 25, 2026

This PR updates a few more of the activitypub endpoints to return a 401 when requesting external users when the client is not logged in to Wanderer.

The reason for this is because lots of web crawlers are hitting my instance, causing it to constantly pull more external users into PocketBase, eventually slowing down the system significantly.

Some more testing of this by other people would be appreciated. Locally this seems to work fine, returning a 401 when logged out, and working as expected when logged in. However when I run this image on my production instance, I seem to get a 400 error when trying to visit external user pages when I'm logged in.

@slothful-vassal
Copy link
Contributor

Hi,

Many thanks for this PR 👍

I have centralised the actor get call and reintroduced a more robust origin check for the handler. I hope this is OK with everyone.

@RobertClarke64
Copy link
Contributor Author

Thanks @slothful-vassal, looks good :)

@RobertClarke64
Copy link
Contributor Author

This is what I've been running on my server for a few days, and is behaving as I'd expect.

@RobertClarke64
Copy link
Contributor Author

Thanks for the review :). Anyone got merge perms?

@slothful-vassal slothful-vassal merged commit 029f1f1 into open-wanderer:main Jan 31, 2026
2 checks passed
@slothful-vassal slothful-vassal mentioned this pull request Feb 2, 2026
@RobertClarke64 RobertClarke64 mentioned this pull request Feb 9, 2026
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

Successfully merging this pull request may close these issues.

3 participants