-
Notifications
You must be signed in to change notification settings - Fork 14
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
gives ability to custom url shorten provider #14
base: master
Are you sure you want to change the base?
Conversation
config: customUrl : the url will wrap with sprintf(), use %s as the source url, example http://shorten_server/add?url=%s customJSON : extract value in JSON for returning, example: ->response->shortedURL note: '->' is required for array, this gives ability to access root level of JSON.
long-en the var name in eval() to improve security hahaha
I tested with some code correction, however it doesn't works. |
OK I figure out this, but something other happen: an error from log: |
OK, the problem is about cross-origin now
|
OK, I finally make it works! I will also publish my shorten site and api soon. |
It's a small upgrade gives ability to custom url shorten provider with following config:
config:
customUrl : the url will wrap with sprintf(), use %s as the source url, example http://shorten_server/add?url=%s
customJSON : extract value in JSON for returning, example: ->response->shortedURL note: '->' is required for array, this gives ability to access root level of JSON.
It use curl on server side to query the provider(it good for local server, more secure). I haven't test it yet bcoz im still working on my shorten script. However I don't have experience on writing owncloud plugin. Can you please help to do a fast review on it? Thanks!