Skip to content

cbrake/ipfs-experiments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPFS experiments

This repo is a simple wrapper repo and set of test files used for my experiemnts with IPFS.

Reference

Current work

fission-codes/kubo#4

Set up IPFS and test basic redirects

Note, every time you update or change a file in the test directory, the CID of the test directory changes!

Notes on go-ipfs http gateway operation

  • if path is directory, and index.html exists in that dir, than that file is served without a redirect
  • if file is not found in directory, then ipfs-404.html is served with 404 code

Reference of other implementations

go has http.Redirect function.

Cloudflare

Cloudflare supports a _redirects file with format of:

[source] [destination] [code?]

Examples:

/home301 / 301
/home302 / 302
/querystrings /?query=string 301
/twitch https://twitch.tv
/trailing /trailing/ 301
/notrailing/ /nottrailing 301
/blog/* https://blog.my.domain/:splat
/products/:code/:name /products?code=:code&name=:name

Cloudflare plans to use 200 code (similiar to Netlify) for Proxying -- likely similiar to rewrite.

Netlify

When you assign an HTTP status code of 200 to a redirect rule, it becomes a rewrite. This means that the URL in the visitor’s address bar remains the same, while Netlify’s servers fetch the new location behind the scenes.

Appears to use the _redirects file as well.

NGINX

https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#rewrite

Caddy

https://caddyserver.com/docs/caddyfile/matchers

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published