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
feat(config): add Local Gateway URL for reverse proxy and Docker (#2486)
* feat: add Local Gateway URL setting for reverse proxy support
Adds a new 'Local Gateway URL' setting that allows users to override
the gateway address from Kubo config. This is useful when:
- Running Kubo in Docker
- Accessing WebUI through a reverse proxy
- Accessing from a different host than where Kubo runs
The setting takes priority over the Kubo config gateway address.
When empty, the behavior falls back to the existing logic.
Fixes#2458
* fix: normalize gateway URLs by stripping trailing slashes
Ensures URLs like 'https://example.com/' and 'https://example.com'
are handled the same way, avoiding double slashes when constructing
paths like /ipfs/CID.
* fix: sync local gateway setting to kuboGateway for Helia/Explore
The ipld-explorer-components (Explore page) uses localStorage key
'kuboGateway' with {host, port, protocol} format. This change syncs
our 'ipfsLocalGateway' setting to that format so the Explore page
also uses the correct gateway URL.
Fixes Explore page using 127.0.0.1:8080 instead of custom gateway.
* fix: avoid 'address' in localGatewayForm description to prevent test flakiness
The e2e test uses getByText('Addresses') which matches any element
containing 'address' (case-insensitive). Changed 'gateway address' to
'gateway URL' in the description to avoid matching this query.
* fix: apply local gateway override everywhere
The Local Gateway URL only reached download links, so previews,
thumbnails and IPNS links still used the public gateway behind a
reverse proxy. Make the override apply to every gateway link the
WebUI builds.
- config: when an override is set, use it as the reachable gateway
too, so previews, thumbnails, Explore and IPNS links honor it
- ipns-manager: use the available gateway URL, which also fixes a
broken link before the gateway check has run
- gateway/ipfs-provider: one shared helper builds the Explore (Helia)
gateway config from the override, and clearing the override resets it
- local-gateway-form: check the URL loads before saving so a typo
cannot silently break links; the check now keeps the port
- settings: show the description above the input like the other
gateway fields, link the gateway address to its Kubo docs, and use
`http://localhost:8080` in the example
- tests: unit coverage for the override selection and the Helia config
helper, plus an e2e that sets a Local Gateway URL and confirms it on
the Status page
Closes#2383
---------
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Copy file name to clipboardExpand all lines: public/locales/en/settings.json
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@
23
23
"translationProjectLink": "Join the IPFS Translation Project"
24
24
},
25
25
"apiDescription": "<0>If your node is configured with a <1>custom Kubo RPC API address</1>, including a port other than the default 5001, enter it here.</0>",
26
+
"localGatewayDescription": "<0>If you access the WebUI through a reverse proxy, Docker, or a different host, enter the gateway URL your browser can reach. Leave empty to use the first <1>gateway address</1> from your Kubo config.</0>",
26
27
"publicSubdomainGatewayDescription": "<0>Select a default <1>Subdomain Gateway</1> for generating shareable links.</0>",
27
28
"publicPathGatewayDescription": "<0>Select a fallback <1>Path Gateway</1> for generating shareable links for CIDs that exceed the 63-character DNS limit.</0>",
0 commit comments