Closed
Description
Symfony version(s) affected
5.4
Description
I am working on a Symfony 5 project. The local setup runs in docker, while the live site is not in docker. The delay issue happens on both, locally and live site.
All the Ajax calls are very slow ~8 seconds each call. The backend logic is not complex and when I open Symfony Profiler, I see that delay happens because of TraceableFirewallListener
This is the security.yaml firewall configuration:
security:
enable_authenticator_manager: true
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
lazy: true
provider: app_user_provider
custom_authenticator: App\Security\AppCustomAuthenticator
switch_user: true
logout:
path: app_logout
target: /login
Any idea how to solve this? Please let me know if you need more information about this.
How to reproduce
Ajax Call:
$.ajax({
url: generateRoute('api_define_template_encoding'),
method: 'GET',
data: {'type' : data.type},
success: data => {
$segments.text(data.segments)
$encoding.text(data.encoding ?? '-')
},
})
Method controller:
public function defineTemplateEncoding(Request $request, SerializerInterface $serializer): JsonResponse
{
return new JsonResponse([
'data'=> ['type' => 'main', 'encoding'=> 'GSM-7', 'segments' => 1],
'json' => true],
200
);
}
Possible Solution
No response
Additional Context
No response


