-
Notifications
You must be signed in to change notification settings - Fork 15
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
Kutt self-hosted support #137
Comments
That is probably not too hard, since I assume the API of kutt.it and a self-hosted instance is identical. However, I do not really have a way to test it? |
Thank you. I am now using the following bookmarklet to create a shortened URL for my self-hosted kutt. javascript: (function() {
fetch("https://HOSTED_DOMAIN/api/v2/links", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "KUTT_API_KEY"
},
body: JSON.stringify({
target: location.href
})
}).then(response => response.json()).then(data => {
navigator.clipboard.writeText(data.link).then(alert("Copied! " + data.link));
}).catch(error => {
navigator.clipboard.writeText(location.href).then(alert("Copied! " + location.href));
});
})(); I am wondering if it would be possible if the domain of the following fetch point is not fixed to kutt.it but variable. copy-shorturl/src/lib/shortener.js Line 80 in f9b791d
You can help with testing methods to the extent possible, either by testing them myself or by issuing API keys for self-hosted kutt. |
Oh thank you this is super helpful. I have a setting for custom shortener domain in there but I think that's less important than the self-hosted domain type. |
Support for self-hosting may be less important for the majority. |
Makes sense to me - the request for self-hosting is pretty common from Copy ShortURL users. I think I'll just add a new setting for it. |
I would like to see support for kutt in self-hostd as well as kutt.it.
The text was updated successfully, but these errors were encountered: