Skip to content

Instantly share code, notes, and snippets.

@EvanHahn
Created December 4, 2013 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EvanHahn/7789601 to your computer and use it in GitHub Desktop.
Save EvanHahn/7789601 to your computer and use it in GitHub Desktop.
req.secure is undefined in Connect apps
connect = require 'connect'
app = connect()
# find-replace "connect" with "express" and req.secure will be a boolean rather than undefined.
app.use (req, res) ->
res.setHeader 'Content-Type', 'text/plain'
res.end "Secure: #{req.secure}"
app.listen(5000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment