Skip to content

Instantly share code, notes, and snippets.

View ihsangan's full-sized avatar
💬
ingfokan mood buat ngoding

Ihsan ihsangan

💬
ingfokan mood buat ngoding
View GitHub Profile
async function handleRequest(request) {
const url = new URL(request.url)
// change the hostname
url.hostname = "example.domain.com"
let req = new Request(url, request)
let response = await fetch(req, {
// RequestInitCfProperties
// see: https://developers.cloudflare.com/workers/runtime-apis/request#requestinitcfproperties
cf: {
minify: { javascript: true, css: true, html: true },

Keybase proof

I hereby claim:

  • I am ihsangan on github.
  • I am ihsangans (https://keybase.io/ihsangans) on keybase.
  • I have a public key ASDwLPordAgg0m1gJhVkbd0OZlyi2lWV55m4HuB5akUCtQo

To claim this, I am signing this object: