Conversation
okurz
left a comment
There was a problem hiding this comment.
looks like a good start. Please extend https://github.com/sqozz/schort/blob/master/tests/functional_tests.py for the new feature
|
What other solutions did you consider? For me it feels like you're abusing a link shortening service for a shortcoming in a different piece of software (libzypp apparently needs such function to work properly?). Did you consider using a regular web server to rewrite your paths instead? E.g. in nginx you can do something like: what is also missing:
|
3aefa80 to
7e2b1ea
Compare
|
Let me here explain rationale for this features: nginx way with using directory way of location will probably work, but it miss the nice way of schort to generate short API on fly for testing versions of repository(API). |
|
I understand. My main problem with this is that schort currently does a 1 to 1 mapping, meaning 1 schort link points to 1 remote destination. This already caused problems in the past to me as my provider received abuse reports because these short links get (abused) to hide malicious content. Can you provide a full example of the long URL (you can replace secret stuff with random strings)? Is it really that dynamic that you need a tool with API access to create shorter paths? |
Description
Add route for handling path of this kind:
<shorten-url><path>Some tools like libzypp needs support for this, for example, http://updates.suse.com returns error 404 for the / path but the /repodata/repomd.xml file is served correctly.Example of use
Example of use: curl -vI http://127.0.0.1:5000/9og4/repodata/repomd.xml