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

Allow CORS and a default 200 response at the root #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rjcorwin
Copy link

This enables CORs and will respond with a 200 at the root of the server. Why does this matter?

Here's a PoC I whipped up that relies primarily on a local dat-gateway when available, but falls back to a public gateway when not available locally.

The PoC Bunsen app served up through a public gateway:
screen shot 2018-04-12 at 12 34 15 pm

The PoC Bunsen app serving up the requested dat through the local gateway because it is available:
screen shot 2018-04-12 at 12 32 30 pm

The PoC Bunsen app serving up the requested dat through the public gateway because the local gateway is not available:
screen shot 2018-04-12 at 12 32 52 pm

The CORs and the response at the root is important because before setting the iframe to the gateway, we do a preflight fetch to see if there is a 127.0.01:3000 gateway available.

@rjcorwin
Copy link
Author

@RangerMauve - This PoC is leaning heavily on your public gateway http://gateway.mauve.moe:3000/bunsen.hashbase.io/

:)

@RangerMauve
Copy link

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.

2 participants