Skip to content

Instantly share code, notes, and snippets.

@adparadise
Created November 2, 2012 22:56
Show Gist options
  • Save adparadise/4004855 to your computer and use it in GitHub Desktop.
Save adparadise/4004855 to your computer and use it in GitHub Desktop.
Proxy server, transform html refactoring
function serveViaProxy (httpRequest, httpResponse) {
if (/\.html/.test(httpRequest.url)) {
serveTransformedHTML(httpRequest, httpResponse);
} else {
serveUnalteredViaProxy(httpRequest, httpResponse);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment