hook.io
hook.io copied to clipboard
Add code highlighter and editor for `/source` route
If the /source for a hook is requested and has the appropriate accept headers, a pretty html view should be rendered with highlighted source code.
The page should also contain a code editor for making modifications if the owner is logged in and accessing the hook.
I just stumbled accross this. Should that also be possible with hooks sourced from secret gists? I'm in no way defending security by obscurity (that's what env is for), just something developers need to be aware of.
@l337r007 -
Missed your comment!
All hooks will actually be public by default. You can always access their /source. Try: http://hook.io/Marak/echo/source
To make Hooks private you will need to upgrade to a paid account.
You should already be able to use private gists? Also, our code editor should be deployed in the next week, so you can store your source code securely in our database.
@Marak -
thanks for clarifying.
Yes, private gists work.
On second thought, I also see that /source doesn't change anything about the "private" aspect, one just needs to keep both (hook and gist) URLs non-public.
I think I was merely confused, since IIRC the differences between development and paid accounts hadn't been published when I wrote my first reply.
Looking forward to pretty-printed source.
If you want privacy, you will have to upgrade to a paid account.
Since all hooks may be publicly listed. Keeping the url a secret isn't going to protect it.
@l337r007 -
FYI, as of a few days ago you can now change the source of hook directly on the site without having to use Github Gist at all.
A dedicated /editor page doesn't exist yet, but when creating a /new hook or using the /admin on an existing hook, you now have the ability to select "Code Editor" as the source of the service.
Cheers!