How to get current domain address in sails.js

前端 未结 6 1450
再見小時候
再見小時候 2021-01-18 22:23

I trying to get current web address using sails.js.

I tried the following:

req.param(\'host\') and req.param(\'X-Forwarded-Protocol\') 
6条回答
  •  -上瘾入骨i
    2021-01-18 23:03

    In Sails v0.10 you can access it through req.baseUrl or sails.getBaseurl() in your views..

提交回复
热议问题