Wishlist: example/support for redirection to online (http/https) resources #311
Replies: 6 comments 5 replies
-
@yarikoptic - at a proof-of-concept level, I think one could override the |
Beta Was this translation helpful? Give feedback.
-
@bbockelm How would one do that while using wsgidav as a library (via the normal |
Beta Was this translation helpful? Give feedback.
-
@jwodder - I don't think you can do it cleanly like that. That's why I said the suggestion would be a proof-of-concept / not great long-term. E.g., you'd have to reproduce the logic around here: wsgidav/wsgidav/request_resolver.py Line 222 in 056831c and then adding the resolver as middleware as in here: wsgidav/wsgidav/default_conf.py Line 61 in 056831c |
Beta Was this translation helpful? Give feedback.
-
@mar10 et alii: I'm interested in submitting a PR that would add support for redirects, and my main question at the moment is what sort of public API you'd like added to
Thoughts? |
Beta Was this translation helpful? Give feedback.
-
How would you implement Maybe it would be better to open a discussion and detail the user story for this. |
Beta Was this translation helpful? Give feedback.
-
Any update on this? |
Beta Was this translation helpful? Give feedback.
-
To a degree it is a reincarnated
It would have been great if there was a sample Provider (and whatever it takes) for a WebDAV server which overall is a simple redirection service to some other http or https website, and assuming some default indexes (e.g. as provided by apache), so it could have config like
and have
/dav/path/file
be redirected tohttps://example.com/someprefix/path/file
.Alternative possibly immediately useful example which could be sufficient to demonstrate ability to redirect, would be to redirect to S3, assuming that permissions allow for listing of the prefix to discover underlying "directories/" (there are no directories on S3 per se). S3 also has support/semantics for COPY and MOVE so there could be those implemented/supported as well, so making it not only read-only.
This would provide a good example on how to establish any other redirection service where corresponding mapping could be more involved, e.g. relying on obtaining target URLs through some API etc.
Beta Was this translation helpful? Give feedback.
All reactions