-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: improved subdomain-url handling #211
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- removed implicit tests based on SubdomainLocalhostGatewayURL - subdomain tests are now run only against origins defined via `--subdomain-url` - DNSLink gateway tests are no longer tied to origin passed via `--subdomain-url`
Results against Kubo master: Summary
|
Results against Kubo latest: Summary
|
lidel
force-pushed
the
fix-subdomain-url
branch
14 times, most recently
from
May 25, 2024 01:25
d985e27
to
120678c
Compare
- splitting into subdomain and dnslink gateway variants - towards avoiding running everything three times - keep custom Host header when defined
these concepts should not mix, and dnslinks should be testable independent of --subdomain-url i also added more useful export format for them, compatible with IPNS_NS_MAP used by Boxo/Kubo/Rainbow
towards fixing underlying issue
all-in-one command for running local kubo with all fixtures in
This replaces magic helpers.UnwrapSubdomainTests with explicit spec preset named proxy-gateway, which can be enabled/disabled the same way as other presets. While it was nice to run every test in both proxy modes, it was extremely noisy and hard to debug once things went wrong. By having explicit tests in *_proxy_test.go it is easy to skip them where proxy functionality is not relevant. Other: - Send meaningful User-Agent - Sent detached path in HTTP Connect proxy tunnel tests (instead of full URL – in tunnel mode we pretend we talk to remote server on the other end of tunnel, and not send full URL like it is done in plain proxy mode)
v0.6.0Changed
|
@simulified cute, reported. A picture for future reference, in case the exploit from #211 (comment) (comment above) gets deleted ;-) |
3 tasks
This is important UX change. We no longer ship with default URLs. User has to provide explicit one, or the test suite will refuse to run. This ensures misconfigurations and testing different gateway endpoint than desired do not happen. Explicit is better than implicit.
This was referenced Jun 9, 2024
lidel
changed the title
fix: subdomain-url handling
feat: improved subdomain-url handling
Jun 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements cleanup described in #185 (comment) and close #185 for good.
SubdomainLocalhostGatewayURL = http://localhost
--subdomain-url
--subdomain-url
defaults tohttp://example.com:8080
now--subdomain-url
tooling/helpers/subdomain.go
– mangling ofHost
,URL
andPath
happens there and in./tooling/test/run.go
, we should refactor tests to setPath
+ optionalHost
header`; proxy tests should be in separate file that can be disabledIPFS_NS_MAP
format