Skip to content

Instantly share code, notes, and snippets.

@apwan
Created March 5, 2020 21:41
Show Gist options
  • Save apwan/6b2b9f93026da5f67821c6cd0e39ec4f to your computer and use it in GitHub Desktop.
Save apwan/6b2b9f93026da5f67821c6cd0e39ec4f to your computer and use it in GitHub Desktop.
test localhost https
#!/usr/bin/env bash
# simply test localhost https, set {rejectUnauthorized: false} when make requests to bypass certificate checking
node -e 'const app=require("https-localhost")(); app.get("/", (req, res)=>{console.log(req.headers); res.send("Hello");}); app.listen(443);'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment