mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
19 lines
No EOL
701 B
YAML
19 lines
No EOL
701 B
YAML
# Redirect every url without an locale to the locale of the user/the global base locale
|
|
|
|
scan_qr:
|
|
path: /scan/{type}/{id}
|
|
controller: App\Controller\ScanController::scanQRCode
|
|
|
|
csp_report:
|
|
path: /csp/report
|
|
methods: [POST]
|
|
defaults: { _controller: nelmio_security.csp_reporter_controller::indexAction }
|
|
|
|
# Must be last as it matches everything
|
|
redirector:
|
|
path: /{url}
|
|
requirements:
|
|
url: ".*"
|
|
controller: App\Controller\RedirectController::addLocalePart
|
|
# Dont match localized routes (no redirection loop, if no root with that name exists) or API prefixed routes
|
|
condition: "not (request.getPathInfo() matches '/^\\\\/([a-z]{2}(_[A-Z]{2})?|api)\\\\//')" |