You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IPFS URI should be loaded over localhost, not 127.0.0.1
Steps to Reproduce
Install IPFS Desktop and it should be started on port 8080
Load http://127.0.0.1:8080/ipfs/QmV4FVfWRG4hJJKUsS1aU9MK85HYFJtuCmYAj8HetS8qMS. It should load the content but retain the https://localhost/ipfs/QmV4FVfWRG4hJJKUsS1aU9MK85HYFJtuCmYAj8HetS8qMS URI in the address bar.
Actual result:
The URI is http://127.0.0.1:8080/ipfs/QmV4FVfWRG4hJJKUsS1aU9MK85HYFJtuCmYAj8HetS8qMS
This is a sensible request and a security fix (raw IP can't have subdomains, so it won't provide origin isolation).
IPFS Companion enforces use of localhost by default, because that is the only way to provide origin isolation per CID (gateway will redirect to proper subdomain, so nothing else needs to be done).
The fix here is to detect requests to 127.0.0.1 and port of local gateway, and redirect them to localhost name
Added replacement 127.0.0.1 to localhost for default gateway. If we setup the public gateway to http://127.0.0.1:8080/, the url will be converted to localhost, but the address bar finally will retain ipfs://bafybeiddzzce2l4stkz6fotj7hugeyehtv3kobcku2jvrakgpiqgx4j6fe/ cc @lidel
It should load the content but retain the ipfs://bafybeiddzzce2l4stkz6fotj7hugeyehtv3kobcku2jvrakgpiqgx4j6fe/
Verified when I loaded http://127.0.0.1:8080/ipfs/QmV4FVfWRG4hJJKUsS1aU9MK85HYFJtuCmYAj8HetS8qMS that it redirected to/retained ipfs://bafybeiddzzce2l4stkz6fotj7hugeyehtv3kobcku2jvrakgpiqgx4j6fe/ in the URL bar.
Description
IPFS URI should be loaded over
localhost
, not127.0.0.1
Steps to Reproduce
http://127.0.0.1:8080/ipfs/QmV4FVfWRG4hJJKUsS1aU9MK85HYFJtuCmYAj8HetS8qMS
. It should load the content but retain thehttps://localhost/ipfs/QmV4FVfWRG4hJJKUsS1aU9MK85HYFJtuCmYAj8HetS8qMS
URI in the address bar.Actual result:
The URI is
http://127.0.0.1:8080/ipfs/QmV4FVfWRG4hJJKUsS1aU9MK85HYFJtuCmYAj8HetS8qMS
Expected result:
According to #13872 (comment), the URI should be https://localhost/ipfs/QmV4FVfWRG4hJJKUsS1aU9MK85HYFJtuCmYAj8HetS8qMS, with
localhost
rather than127.0.0.1
Reproduces how often:
Brave version (brave://version info)
Version/Channel Information:
cc: @spylogsster @lidel
The text was updated successfully, but these errors were encountered: