Added a config option to set Path attribute in Set-Cookie header.
This commit is contained in:
1 parent
ee9a35b9b3
commit
70b0dbad29
2 files changed
+7
-1
No files matched your search
+6
-1
@@ -131,7 +131,12 @@ inform = (currentRequest, cwmpRequest) ->
|
||||
methodResponse : {type : 'InformResponse'},
|
||||
cwmpVersion : cwmpRequest.cwmpVersion
|
||||
})
|
||||
res.headers['Set-Cookie'] = "session=#{currentRequest.sessionId}"
|
||||
|
||||
if !!cookiesPath = config.get('COOKIES_PATH', currentRequest.session.deviceId)
|
||||
res.headers['Set-Cookie'] = "session=#{currentRequest.sessionId}; Path=#{cookiesPath}"
|
||||
else
|
||||
res.headers['Set-Cookie'] = "session=#{currentRequest.sessionId}"
|
||||
|
||||
writeResponse(currentRequest, res)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user