Closed takali closed 1 year ago
Hi @takali,
I'm sorry you're experiencing problems, and that it took me a while to answer you.
In our projects, we do it in a similar way to yours, so I'm not sure what's going on in your situation.
We don't define the defaults in the annotation.yaml
, that is already handled by the router.request_context.scheme
parameter.
However, we do also configure the host in the router.request_context.host
parameter.
Does it help when you also configure that?
When I generate a JSON file of routes (
bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
), I got an issue with the scheme.When i set a global scheme in my parameter, the scheme is not in my json file
When i force the scheme in the annotations file, for all controlles (or one specific controller) the scheme is not in my json file
If i specify the scheme in the Route annotation
@Route("/login", name="login", schemes={"https"})
, it does works and the scheme is in my json file.The thing is i do not want to specify scheme route by route, i'd rather do it globally (in parameters.yaml or annotations.yaml) becauce it allow me to set different scheme by env (http in local, https in production...). Is there a way to set a global scheme in my dump json ? My FOSJSRouting version is 2.4.0 Symfony version : 4.3