Steven Allen
a006ded010
chore: update webui to 2.12.1
2021-04-28 11:00:45 -07:00
Marcin Rataj
9f8964e6f9
fix(gw): remove hardcoded hostnames
...
This closes #7317 by removing hardcoded PL hostnames from default
config, making the localhost the only implicit gateway hostname.
2021-04-12 18:03:44 +02:00
Steven Allen
4cdb67f37d
Merge pull request #7890 from ipfs/fix/remove-clear-site-data
...
fix(gw): remove use of Clear-Site-Data in subdomain router
2021-03-31 16:24:24 -07:00
Steven Allen
0a3f88823c
Merge pull request #7994 from ipfs/chore/deprecate-pathprefixes
...
chore: deprecate Gateway.PathPrefixes
2021-03-30 15:52:02 -07:00
Marcin Rataj
2f105f79b9
chore: deprecate Gateway.PathPrefixes
...
Context:
https://github.com/ipfs/go-ipfs/issues/7702#issuecomment-803136077
2021-03-30 21:17:41 +02:00
Steven Allen
d30f1e5d44
Merge pull request #7930 from ipfs/fix/redundant-ns-on-gateway
...
feat(gw): /ipfs/ipfs/{cid} → /ipfs/{cid}
2021-03-24 13:12:16 -07:00
Marcin Rataj
763a120ed2
fix: no fixup if X-Ipfs-Gateway-Prefix is present
...
https://github.com/ipfs/go-ipfs/pull/7930#discussion_r597976690
2021-03-20 00:00:58 +01:00
Marcin Rataj
a35ffee136
refactor: safer query handling
...
https://github.com/ipfs/go-ipfs/pull/7930#discussion_r597246135
2021-03-18 23:48:53 +01:00
Marcin Rataj
450baef0e9
refactor: explicit prefix check
...
https://github.com/ipfs/go-ipfs/pull/7930#discussion_r584001161
2021-03-18 21:48:04 +01:00
Marcin Rataj
b81b7549d3
refactor: addressing review
...
- moved to separate utility function
- return Bad Request error
- improved escaping of values passed via URL path
2021-03-18 21:22:07 +01:00
lanzafame
4ba03fa8df
revert registration of metrics against unexposed prom registry
2021-03-17 10:15:42 +10:00
Hector Sanjuan
3db9551f79
Extract the namesys and the keystore submodules
...
Namesys is a very useful submodule. Given a ValueStore and a Datastore it can
resolve and publish /ipns/ paths.
This functionality does not need to be sequestered inside go-ipfs as it can
and should be used without IPFS, for example, for implementing lightweight
IPNS publishing services or for resolving /ipns/ paths.
"keystore" extraction was necessary, as there is a dependency to it in
namesys. Keystore is also a useful module by itself within the stack.
Fixes #6537
2021-03-12 14:09:36 -05:00
Marcin Rataj
dae7387584
refactor: show error, delay redirect
...
This implements error page that does not hide the problem,
but still redirects to a valid path after short delay:
https://github.com/ipfs/go-ipfs/pull/7930#issuecomment-786882748
2021-02-27 00:57:05 +01:00
Marcin Rataj
15e3732afd
feat(gw): /ipfs/ipfs/{cid} → /ipfs/{cid}
...
This will try to recover from invalid paths like /ipfs/ipfs/{cid}
and redirect to proper one, when possible.
2021-02-20 00:09:17 +01:00
Marcin Rataj
d61ae2bcb4
fix: remove use of Clear-Site-Data
...
We used Clear-Site-Data to cushion transition period for local gateway
exposed at http://localhost while we were still figuring out
security-related details.
In the final implementation subdomain gateways are not tied to a
hostname explicitly, which removes the risk of cookies leaking,
removing the need for the header.
Turns out it causes issues for Firefox users, so let's just remove it.
Closes https://github.com/ipfs-shipyard/ipfs-companion/issues/977
2021-01-29 22:08:16 +01:00
Marcin Rataj
a0f90d3a14
test: cover 2 remaining lines
2021-01-14 20:53:20 +01:00
Marcin Rataj
abb25a1cfc
refactor: remove redundant urlescape
...
URL.Query() will already decode the query parameters
2021-01-14 20:52:04 +01:00
Marcin Rataj
3de5b14e0c
fix: ?uri= url-decode and preserve query
...
This makes ?uri= param able to process URIs passed by web browsers
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler
2021-01-14 20:52:04 +01:00
Dennis Trautwein
36368ee4dd
feat: support requests from registerProtocolHandler
...
This commit adds support for requests produced by navigator.registerProtocolHandler on gateways. Now one can register `dweb.link` as an URI handler for `ipfs://`:
```
navigator.registerProtocolHandler('ipfs', 'https://dweb.link/ipfs/?uri=%s ', 'ipfs resolver')
```
Then opening `ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR` will produce an HTTP GET call to:
```
https://dweb.link/ipfs?uri=ipfs%3A%2F%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
```
The query parameter `uri` will now be parsed and the given content identifier resolved via:
`https://dweb.link/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR `
2021-01-14 20:52:04 +01:00
Marcin Rataj
f932510b88
fix: check if rootID has DNSLink before uninlining
...
This kinda enables to run their custom DNS resolver with custom
tlds/names that are independent from the public DNS network.
2021-01-14 20:14:35 +01:00
Marcin Rataj
88dd257ace
test: false for isHTTPSRequest
...
As suggested in
https://github.com/ipfs/go-ipfs/pull/7847#discussion_r551933162
2021-01-08 00:31:46 +01:00
Marcin Rataj
09178aa717
feat(gw): support inlined DNSLink names with TLS
...
Problem statement and rationale for doing this can be found under
"Option C" at: https://github.com/ipfs/in-web-browsers/issues/169
TLDR is:
`https://dweb.link/ipns/my.v-long.example.com ` can be loaded from a
subdomain gateway with a wildcard TLS cert if represented as a single
DNS label: `https://my-v--long-example-com.ipns.dweb.link `
2021-01-01 21:39:42 +01:00
Adin Schmahmann
fb3316ad05
fix: decrease log level of opencensus initialization
2020-12-08 21:46:49 -05:00
lanzafame
024bf80e6a
change the scraping url
2020-12-08 20:22:43 -05:00
lanzafame
3d9821260a
register quic opencensus metrics
2020-12-08 20:22:38 -05:00
Adin Schmahmann
76f3395ee6
p2p-proxy: earlier peerID validation check
2020-12-01 12:24:18 -05:00
Adin Schmahmann
a329e4fc66
p2p-proxy: better request length checking
2020-12-01 11:01:40 -05:00
Adin Schmahmann
499e011df9
Merge pull request #7699 from ipfs/fix/dnslink-dir-listing
...
fix(dnslink-gw): breadcrumbs and CID column when dir listing
2020-11-10 15:03:36 -05:00
Adin Schmahmann
0700c74bad
Merge pull request #7727 from ipfs/fix/preserver-query-on-website-redirect
...
fix(gw): preserve query on website redirect
2020-11-10 14:36:11 -05:00
Adin Schmahmann
675ef92a2a
Merge pull request #7716 from ipfs/feat/webui-v2.11.3
...
feat: ipfs-webui v2.11.4
2020-11-10 14:21:55 -05:00
Marcin Rataj
d1c20bdff7
fix: localhost API access via ipv6
...
This adds localhost ipv6 addresses to the allowlist for use in browser
context and fixes WebUI on ipv6-only deployments: http://[::1]:5001/webui
We were missing CORS/Origin tests for API port so I've added basic ones
and included localhost/127.0.0.1/::1 variants.
2020-10-20 00:46:40 +02:00
Marcin Rataj
6ffd0aa22e
fix(gw): preserve query on website redirect
2020-10-14 00:46:57 +02:00
Marcin Rataj
f62656630b
feat: ipfs-webui v2.11.4
2020-10-07 15:01:32 +02:00
Marcin Rataj
00147106f4
feat: ipfs-webui v2.11.3
...
https://github.com/ipfs-shipyard/ipfs-webui/releases/tag/v2.11.3
2020-10-06 19:57:18 +02:00
Adin Schmahmann
9c60ad89de
Merge pull request #7703 from rafaelramalho19/chore/bump-go-ipfs
...
chore: webui v2.11.2
2020-10-02 11:53:09 -04:00
Adin Schmahmann
9b1171d427
Merge pull request #7677 from ipfs/feat/content-disposition-attachment
...
feat(gateway): Content-Disposition improvements
2020-10-02 11:20:11 -04:00
Marcin Rataj
3ed46d995f
test(gw): add t0115-gateway-dir-listing.sh to sharness
...
This adds proper end-to-end tests for directory listing on Gateway port
that protects us against regressions oni each gw type:
- path gateway
- subdomain gateway
- dnslink website gateway
Tests cover:
- etag/unicode support
- breadcrumbs
- file name column
- hash column
2020-09-29 02:27:28 +02:00
Marcin Rataj
c94bd768d2
fix(gw): links in CID column on dir listing
...
This switches go-ipfs to dir-index-html after
https://github.com/ipfs/dir-index-html/pull/43
got merged to master
2020-09-28 23:12:47 +02:00
Rafael Ramalho
43b8a314f1
chore: bump webui version
2020-09-28 18:10:23 +01:00
Marcin Rataj
cd1feb3af4
fix(gateway): correct breadcrumbs on dnslink site
2020-09-25 23:11:53 +02:00
Rafael Ramalho
1b4f5e72ad
chore: bump webui version
2020-09-17 15:29:07 -04:00
Marcin Rataj
19ec5f4a51
feat(gateway): Content-Disposition for legacy clients
...
This adds ASCII-only filename for clients that do not implement RFC 5987
Closes #7648
2020-09-16 22:39:04 +02:00
Marcin Rataj
fd01acdfc0
feat(gateway): ?filename with download=true
...
This implements 'attachment' mode triggered then
?filename parameter is accompanied with &download=true
When Content-Disposition: attachment is detected by a modern browser
it will skip rendering and immediately open the "save as" dialog,
making this useful feature for using IPFS gateway as target of
"Download" links on various websites.
Parameter name was suggested in:
https://github.com/ipfs/go-ipfs/pull/4177#issuecomment-414870327
2020-09-16 22:15:18 +02:00
Adin Schmahmann
45e574b6bd
Merge pull request #7610 from ipfs/chore/update-deps
...
chore: update dependencies
2020-08-25 23:14:52 -04:00
Adin Schmahmann
b88bdfeb9d
chore: update go-multiaddr and go-multiaddr-net
2020-08-25 15:24:48 -04:00
Adin Schmahmann
bd08c0a4a6
Merge pull request #7550 from trashhalo/dry-up-close
...
use t.Cleanup() to reduce the need to clean up servers in tests
2020-08-25 12:06:26 -04:00
Kevin Neaton
2feff33235
test: update gateway tests for dir-index-html v1.1.0
2020-08-19 20:31:23 -04:00
Kevin Neaton
044790a838
feat: Directory page UI improvements
...
These changes are needed to prepare for the Directory page UI improvements
implemented in https://github.com/ipfs/dir-index-html/issues/37 .
- update dir-index-html type structs
- emit gateway URL for root links
- emit CID of each directoryItem
- emit size of directory
- emit breadcrumbs
2020-08-19 20:09:35 -04:00
Marcin Rataj
6b6569f3e5
refactor: cleanup/comment
...
https://github.com/ipfs/go-ipfs/pull/7319#discussion_r472734905
License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2020-08-19 15:59:47 +02:00
Marcin Rataj
2ff6f1a80d
test(gateway): IPNS cleanup and implicit defaults fix
...
This ensures implicit defaults are always present, even when
Gateway.PublicGateways is defined in the config.
User still can disable them, but needs to do it per hostname.
License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2020-08-06 14:00:16 +02:00