Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: webui on ipv6 localhost #7731

Merged
merged 1 commit into from Oct 26, 2020
Merged

fix: webui on ipv6 localhost #7731

merged 1 commit into from Oct 26, 2020

Conversation

lidel
Copy link
Member

@lidel lidel commented Oct 19, 2020

This PR adds localhost's ipv6 addresses to the Origin allowlist which is used in browser context, which fixes WebUI on ipv6-only deployments when loaded via http://[::1]:5001/webui

Without ip6 listed in defaultLocalhostOrigins webui will fail with:

2020-10-19--23-01-50

We were missing CORS/Origin tests for API port, so I've added basic ones in test/sharness/t0401-api-browser-security.sh and included localhost/127.0.0.1/::1 variants to ensure webui works no matter what localhost notation is used.

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.
@lidel lidel added need/review Needs a review topic/rpc-api Issues related to Kubo RPC API at /api/v0 labels Oct 19, 2020
@lidel lidel marked this pull request as ready for review October 19, 2020 23:09
@Stebalien Stebalien merged commit 0401f60 into master Oct 26, 2020
@lidel lidel deleted the fix/http-api-cors-allowlist branch October 26, 2020 23:05
@aschmahmann aschmahmann mentioned this pull request Feb 18, 2021
73 tasks
hacdias pushed a commit to ipfs/boxo that referenced this pull request Jan 27, 2023
fix: webui on ipv6 localhost

This commit was moved from ipfs/kubo@0401f60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/review Needs a review topic/rpc-api Issues related to Kubo RPC API at /api/v0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants