K
K
Kripto772020-11-05 11:22:39
symfony
Kripto77, 2020-11-05 11:22:39

How to force debug panel to load via https in Symfony 5?

Symfony 5.1 project entirely on https. At the same time, the debug panel is loaded only via http, the browser blocks it as mixed content.

If you allow mixed content, we get the error Single origin policy: CORS header "Access-Control-Allow-Origin" is missing - there is no access to setting headers, I can not allow CORS.

Auto redirect from http to https is enabled, it is written in services.yaml

parameters:
    router.request_context.scheme: 'https'
    asset.request_context.secure: true


If you write the code in routes.yaml, you get a cyclic redirect
_wdt:
  path:       /_wdt
  schemes:    [https]


Please advise how to make this ... debug panel load via https

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question