Replies: 4 comments
-
I guess we need (more details on) the configuration… 🤷 |
Beta Was this translation helpful? Give feedback.
-
I've had similar issue in the past but got mine working. What I noticed was that it will throw rate limit error if API signature is not specified in the URL. Edit: I tried manually by copying the urlshortner link I got from your paste:- So, from my experience, it is mandatory to specify it in both URL and API. Lets assume the following for example, but don't forget to replace the address and signature with actual ones:-
Try with the following config:-
Note: Unfortunately, this will expose the secret API key to the browser which users can check under Network tab of Developer Tools. But I have not found any other configuration to make it work with YOURLS while hiding the API key from the client at the same time. The API can only be used for creation of short URLs and does not allow access to the admin interface, so it should be fine I guess? What this means is users can manually create short URLs for other URLs outside of your pastebin as well by manually entering the urlshortner link and then adding their custom link at the end. Like for example:- I'm not sure how the URL shortner function would work otherwise without providing the API key to the client, since the paste server itself doesn't seem to handle it in the backend. The client requests that in the browser from my understanding, since aside from the Network tab exposing it, I can also see the IP that created the paste's short URL in the admin interface and it's not the IP of the server, it's the client's IP. |
Beta Was this translation helpful? Give feedback.
-
Sorry, but that does not sound right - the whole point of the proxy feature is to hide that signature, so the expected config for the above should look like this:
|
Beta Was this translation helpful? Give feedback.
-
Yes, that's what I initially did but with such configuration, I get rate limit error. Edit: I tested it now and I'm not facing into the error I did in the past, weird. Edit2: Nevermind, different issue now with that configuration, the shortened URL shows as "http://yourls.org/" for some reason and in admin interface, there's nothing generated. Under network I can see it is correct:- Edit3: Ah, I only updated the parameter and forgot to replace urlshortener sub-domain that was still pointed to the url shortner instead of the paste's address. Now it's working correctly! |
Beta Was this translation helpful? Give feedback.
-
Did you use the FAQ section?
Steps to reproduce
What happens
It throws error "Cannot parse response from URL shortener.". Even though everything is setup correctly
What should happen
It should shorten the url no issue
Additional information
I'm using YOURLS as a self-hosted software for url shortener. I wanna use the option (as provided in the configuration wiki) to make the api call on the server side, so the signature is not visible to the client
Basic information
Server address: https://paste.mandarynki.eu
Server OS: Linux Alpine
Webserver: NGINX
Browser:
PrivateBin version: stable 1.7.5
I can reproduce this issue on https://privatebin.net: No
Beta Was this translation helpful? Give feedback.
All reactions