Open OR13 opened 3 years ago
The simplicity is admirable.
By clean up, do you mean reduce the number of statements?
... https://$1/$2/did.json [R=302,L]
... https://$1/$2/$3/did.json [R=302,L]
... https://$1/$2/$3/$4/did.json [R=302,L]
@gribneau yes, currently being forced to write a rule for very level of nesting because I can't figure out how to use htaccess rules to replace ":" with "/" in a recursive regex.
I don't think we can do a global or recursive string replace in the context of a rewrite rule.
Something like mod_lua might be a cleaner path.
I asked on the w3id.org repo, even the regex opens them up for redos and other attacks but perhaps there are features they know of which might help.
another alternative would be to limit the nesting depth in the spec, which might be a good idea for security reasons anyway...
ping @dmitrizagidulin @awoie
Interesting - using w3id.org as a resolver creates a nice herd privacy effect. I like where you're going with this, but not sure I know how to help with your issue around making this recursive at this point.
If someone who is better with htaccess and regex can clean this up, we don't need a did web resolver any more.