mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-03 01:34:34 +02:00
Added simple redirect to info page, when scanning an QR code.
This commit is contained in:
parent
2768eb1745
commit
c200b650a0
4 changed files with 95 additions and 10 deletions
|
@ -3,10 +3,15 @@
|
|||
# controller: App\Controller\DefaultController::index
|
||||
|
||||
# Redirect every url without an locale to the locale of the user/the global base locale
|
||||
redirector:
|
||||
path: /{url}
|
||||
requirements:
|
||||
url: ".*"
|
||||
controller: App\Controller\RedirectController:addLocalePart
|
||||
# Dont match localized routes (no redirection loop, if no root with that name exists)
|
||||
condition: "not (request.getPathInfo() matches '/^\\\\/[a-z]{2}(_[A-Z]{2})?\\\\//')"
|
||||
|
||||
scan_qr:
|
||||
path: /scan/{type}/{id}
|
||||
controller: App\Controller\ScanController:scanQRCode
|
||||
|
||||
#redirector:
|
||||
# path: /{url}
|
||||
# requirements:
|
||||
# url: ".*"
|
||||
# controller: App\Controller\RedirectController:addLocalePart
|
||||
# # Dont match localized routes (no redirection loop, if no root with that name exists)
|
||||
# condition: "not (request.getPathInfo() matches '/^\\\\/[a-z]{2}(_[A-Z]{2})?\\\\//')"
|
Loading…
Add table
Add a link
Reference in a new issue