After hours of search, i ask this question here because i think that there is no answers was found for this issue.
The problem is very simple: Trying to access to _fragment outside twig that works fine whith render_esi function in twig.
I disabled the trusted proxy entry in config.yml:
trusted_hosts: ~
trusted_proxies: false
fragments:
path: /_fragment
enabled: true
And in security.yml, i put :
anonymous: true
When i try to access any fragment via web browser, i got and AccessDenied Exception with message in the profiler saying: "You are not logged in".
What is the problem of this ? why profiler is saying that i'm not logged in ?
Here is the last error log:
at FragmentListener ->validateRequest (object(Request))
in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php at line 65
Thank you