w3id.org icon indicating copy to clipboard operation
w3id.org copied to clipboard

Available features for complex redirects

Open OR13 opened this issue 4 years ago • 2 comments

For complex rewrites that are string specific, simple regex can be cumbersome, see this thread here:

https://github.com/w3c-ccg/did-method-web/issues/25#issuecomment-804346218

Are there any features of w3id.org that we should be aware of that might be able to support recursive / string replacement in redirects better?

OR13 avatar Mar 25 '21 18:03 OR13

I'm not clear on the problem. Is there a set of test vectors for input vs output urls?

The quick answer is probably that there is nothing special enabled. We tried to keep the w3id.org apache config simple. The idea being to just keep the service mainly as a stable namespace that redirects elsewhere. There's nothing stopping people from redirecting to another service to do more complex processing.

That being said, maybe you can use the N flag (with iteration limit option) to do some recursive processing?

davidlehn avatar Mar 25 '21 19:03 davidlehn

@davidlehn

the did web spec says you can convert strings like this:

did:web:example.com => https://example.com/.well-known/did.json did:web:example.com:folder1 => https://example.com/folder1/did.json did:web:example.com:folder1:folder2 => https://example.com/folder1/folder2/did.json etc...

for an arbitrary number of nested :folderN how to convert to the URL on the right with perma-id ?

OR13 avatar Mar 25 '21 19:03 OR13