Set cookies to be HTTP only

This commit is contained in:
Toby Zerner 2015-09-14 14:40:05 +09:30
parent 17965f2f61
commit 552e50074e

View File

@ -24,6 +24,7 @@ trait WritesRememberCookie
SetCookie::create('flarum_remember', $token) SetCookie::create('flarum_remember', $token)
->withMaxAge(14 * 24 * 60 * 60) ->withMaxAge(14 * 24 * 60 * 60)
->withPath('/') ->withPath('/')
->withHttpOnly(true)
); );
} }
@ -35,6 +36,7 @@ trait WritesRememberCookie
SetCookie::create('flarum_remember') SetCookie::create('flarum_remember')
->withMaxAge(-2628000) ->withMaxAge(-2628000)
->withPath('/') ->withPath('/')
->withHttpOnly(true)
); );
} }
} }