Part-DB-server/config/routes.yaml

29 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2025-11-30 15:01:37 +01:00
# yaml-language-server: $schema=../vendor/symfony/routing/Loader/schema/routing.schema.json
# This file is the entry point to configure the routes of your app.
# Methods with the #[Route] attribute are automatically imported.
# See also https://symfony.com/doc/current/routing.html
# To list all registered routes, run the following command:
# bin/console debug:router
# Redirect every url without an locale to the locale of the user/the global base locale
scan_qr:
path: /scan/{type}/{id}
2023-07-02 14:03:29 +02:00
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
2025-11-30 15:01:37 +01:00
condition: "not (request.getPathInfo() matches '/^\\\\/([a-z]{2}(_[A-Z]{2})?|api)\\\\//')"