Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Symfony 5.4 - Why do I still getPHPSESSID cookie for/probe paths despite setting firewallsecurity tofalse andstateless totrue?#61019

Unanswered
renepupil asked this question inQ&A
Discussion options

We use redis as native session storage inphp.ini template:

session.save_handler = redissession.save_path = "${REDIS_PATH}"session.cookie_httponly = 1session.use_strict_mode = 1session.cookie_secure = 1session.use_trans_sid = 0

Sessionframework.yaml settings:

framework:session:handler_id:~cookie_secure:truecookie_httponly:truestorage_factory_id:session.storage.factory.php_bridge

We added some/probe routes for kubernetes probes:

#[Route('/probe', name:'app_frontend_probe_')]class ProbeControllerextends AbstractController{    #[Route('/liveness', name:'liveness')]publicfunction getLiveness(Request$request):JsonResponse

For these we don't security and sessions, hence I disabled security for/probe routes insecurity.yaml:

security:firewalls:probe:pattern:^/probe/security:falsestateless:true

Why do I still getPHPSESSID when calling/probe/ endpoints with these settings in browser?

You must be logged in to vote

Replies: 1 comment

Comment options

Can you check yourprobe firewall really matches/probe/liveness (it won’t be the case if a previous firewall’s pattern also matches)?

(Note that you don’t need to configure a firewall asstateless if itssecurity isfalse.)

If a session is still being created, configure your routes asstateless to see why; you should probably do it anyway.

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@renepupil@MatTheCat

[8]ページ先頭

©2009-2025 Movatter.jp