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

Improve content negotiation handling for forwarding AS2 requests #2463

Open
snarfed opened this issue Nov 9, 2023 · 1 comment
Open

Improve content negotiation handling for forwarding AS2 requests #2463

snarfed opened this issue Nov 9, 2023 · 1 comment
Labels
c: bug Something isn't working s: pending triage Pending Triage

Comments

@snarfed
Copy link

snarfed commented Nov 9, 2023

Hi all! First off, thank you for building and maintaining Elk. It's great!

A few of us noticed recently in #2457 that Elk's Accept header parsing for content negotiation is pretty brittle and limited. It looks like it only forwards requests to the underlying Mastodon instance if the Accept header is exactly application/ld+json; profile="https://www.w3.org/ns/activitystreams". If it's at all different, eg even just removing the space to get application/ld+json;profile="https://www.w3.org/ns/activitystreams", Elk serves HTML instead of forwarding.

(My service uses a more involved Accept: application/activity+json; q=0.9, application/ld+json; profile="https://www.w3.org/ns/activitystreams"; q=0.8, text/html; charset=utf-8; q=0.7, which Elk also doesn't handle.)

Thanks in advance for looking at this!

(Btw, on a related note, lower priority, any chance you could configure https://elk.zone/ to forward AS2 conneg requests too? Right now it doesn't, even with the exact Accept header above.)

@snarfed snarfed added c: bug Something isn't working s: pending triage Pending Triage labels Nov 9, 2023
Copy link

stackblitz bot commented Nov 9, 2023

Solve in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

snarfed added a commit to snarfed/granary that referenced this issue Nov 9, 2023
doesn't fix interop with Elk (elk-zone/elk#2463 ), but it's a step
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: bug Something isn't working s: pending triage Pending Triage
Projects
None yet
Development

No branches or pull requests

1 participant