req.headers.host - the host and port
req.url - the entire path
req.method - PUT/GET/POST/etc.
But how do you get the protocol part of the URL?
--
You received this message because you are subscribed to the Google Groups "Express" group.
To post to this group, send email to expre...@googlegroups.com.
To unsubscribe from this group, send email to express-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/express-js?hl=en.
J�r�my.
PS: expressjs is wonderful :)
On 07/02/2012 13:23, vision media [ Tj Holowaychuk ] wrote:
> we already reconstruct it in res.redirect(), I could expose it as req.<something>.
>
> On Thu, Feb 2, 2012 at 9:31 AM, kapouer <hol...@gmail.com <mailto:hol...@gmail.com>> wrote:
>
> Hi,
> an answer at :
> http://groups.google.com/group/express-js/browse_thread/thread/b0b51f7ca1090859/8a364687e0ffeca8
>
> req.connection.encrypted ? 'https' : 'http'
>
> If i want to populate my <base> tag, i must prepare that local
> variable :
> (req.connection.encrypted ? 'https' : 'http') + '://' +
> req.header('host') + (req.app.settings.basepath || '')
>
> ugly !
>
> --
> You received this message because you are subscribed to the Google Groups "Express" group.
> To post to this group, send email to expre...@googlegroups.com <mailto:expre...@googlegroups.com>.
> To unsubscribe from this group, send email to express-js+...@googlegroups.com <mailto:express-js%2Bunsu...@googlegroups.com>.