dat-gateway
dat-gateway copied to clipboard
Allow CORS and a default 200 response at the root
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:

The PoC Bunsen app serving up the requested dat through the local gateway because it is available:

The PoC Bunsen app serving up the requested dat through the public gateway because the local gateway is not available:

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.
@RangerMauve - This PoC is leaning heavily on your public gateway http://gateway.mauve.moe:3000/bunsen.hashbase.io/
:)
I think that garbados' fork is the main repo for this project now. @garbados