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

Add RAINBOW_TRUSTLESS_GATEWAY_DOMAINS=trustless-gateway.link #71

Closed
Tracked by #12
lidel opened this issue Jan 30, 2024 · 0 comments · Fixed by #81
Closed
Tracked by #12

Add RAINBOW_TRUSTLESS_GATEWAY_DOMAINS=trustless-gateway.link #71

lidel opened this issue Jan 30, 2024 · 0 comments · Fixed by #81
Assignees
Labels
need/triage Needs initial labeling and prioritization

Comments

@lidel
Copy link
Member

lidel commented Jan 30, 2024

Problem

  • https://trustless-gateway.link should be limited to trustless responses.
  • Right now rainbow allows deserialized responses for all domains, so the limiting of response types to trustless car/block/ipns-record on that domain is done at Nginx, which is a bit janky.
    • For example, it does support Accept: application/vnd.ipld.car but errors on ?format=car, which is a bug we need to fix eventually.

Solution

I believe explicit is better than implicit here.

Initial idea: We already have RAINBOW_SUBDOMAIN_GATEWAY_DOMAINS. Add similar, explicit RAINBOW_TRUSTLESS_GATEWAY_DOMAINS which limits specified domains to only support trustless responses, and return HTTP 400 Bad Request for everything else, and use it with trustless-gateway.link

cc @ns4plabs @hacdias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants