-
Notifications
You must be signed in to change notification settings - Fork 12
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
Handle path after short link #9
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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