-
Notifications
You must be signed in to change notification settings - Fork 325
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
[MV3 Beta Bugs] Single catch-all rule per subdomain gateway #1278
Comments
@lidel it looks like this is a invalid edge case Source: https://cid-ipfs-tech.ipns.dweb.link/ the rule add just updates the redirect if the source is the same, because we don't want to break the current redirect. However, that example is weird because |
@whizzzkid Could be that i've pasted Subdomain gateways on TLS wildcard certs work only for a single DNS label, so we can't have So if you have captured a value under subdomain like
Good one for testing is https://en-wikipedia--on--ipfs-org.ipns.dweb.link/ as it had both. |
@lidel in that case, we cannot do anything about this. The declarative rules are designed to be static in nature. The most we can do is regex manipulation. So capturing group and replacing it in the redirect is the best we can do. Which means in the example: Source: which will work, but is that an acceptable tradeoff? The regex would be simple i.e. find whatever the path is and place the group in there, remember we cannot replace |
Hm... I get it now. Thank you for explanation @whizzzkid! I think the tradeoff would be net positive. The inlined DNSLink identifier on subdomain is a rather a niche use case, most DNSLink+Companion users will visit DNSLink website using the original URL. We would have a single static rule per subdomain gateway, no need for constant rule-miss and retractive updates:
As for cosmetics, replacing Kubo already does things like normalization of CIDv0 to CIDv1 or switching to Base36 (example) when Base32 would be too long for IPNS Name to fit in a single DNS Label (ipfs/kubo#7318). I think it is sensible if we decode inlined DNS before making the redirect too. This only impacts internals of subdomain redirect from public to local gateway. Functionally, there is no bug. @whizzzkid so feel free to park this fix until we have Kubo with necessary normalization logic (i've opened ipfs/boxo#462 but tbd if this will get into Kubo 0.23 or 0.24). |
Subdomain gateway URLs seem to constantly override a rule,with new one that is site-specific, instead of adding a single catch-all one.
This makes the UI for managing rules confusing, as the catch-all is pointing at website-specific URL, but theings seem to work fine.
How to reproduce
Expected behavior
Create a single catch-all rule per subdomain gateway.
For example:
^https?://(.*?).(ipfs|ipns).dweb.link/(.*)
http://localhost:8080/\2/\1/\3
The text was updated successfully, but these errors were encountered: