
Show HN: A very simple http “proxy” on runkit - projectant
https://runkit.io/dosyago-coder-0/proxy/branches/master
======
projectant
What I'm interested in, is how can they run this stuff? How is it cost
effective for them? How is it safe? Runkit is basically free serverless node.
It's pretty amazing.

For those interested, the code is here: [https://runkit.com/dosyago-
coder-0/proxy](https://runkit.com/dosyago-coder-0/proxy)

It does the simplest possible:

\- prepends the URL form to the proxied html page

\- prepends a <base> element with the proxied page's uri ( to ensure relative
links point to the source and not the proxy )

\- prepends a script which captures clicks on anchor links and instead of
allowing the navigation to proceed submits the URL ( via the prepended form )
back to the endpoint

Also, for the sake of a technical challenge, I don't know how to get it to
work on Amazon.com -- what happens is after the first load, any links clicked
seem to break out of the proxy. Anyone who can work out why it doesn't work,
please tell me!

 _edit: oops, seems as if the HN 'glance' of death ( not hug, this has only
been on for 20 minutes ) kills it intermittently, and that runkit has a quota
that is sometimes exceeded!_

~~~
mtmail
runkit is owned by stripe so they likely don't have to be profitable.

