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

Appearance settings

[FrameworkBundle] Configure RequestContext through router config #35229

Copy link
Copy link
Closed
@ogizanagi

Description

@ogizanagi
Issue body actions

Description

Currently, there are three parameters allowing to configure the RequestContext:

  • router.request_context.host
  • router.request_context.scheme
  • router.request_context.base_url

(actually there is also request_listener.http_port & request_listener.https_port but these are in fact configured by the framework.router config.

While setting these parameters are common in an application and are documented, they have a poor discoverability (and even someone used with these has to keep looking at sources or the docs to find out their name).
So why not adding a new framework.router.context node in config as the preferred way to configure it?
Current parameters would be kept as defaultValue for BC (no need to deprecate them I guess, but we could still figure out a way to do so)

Example

framework:
    router:
        context:
            host: localhost
            schema: http
            base_url: null

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.