From 20503eaf77166c0b638beb84ee6d0a0be8e95113 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Sun, 8 Dec 2024 06:12:54 +0100 Subject: [PATCH] Add css, img and js bundle routes Cleaner routes Cleanup --- config/routes/rapsyspack.yaml | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/config/routes/rapsyspack.yaml b/config/routes/rapsyspack.yaml index aa0a953..b238403 100644 --- a/config/routes/rapsyspack.yaml +++ b/config/routes/rapsyspack.yaml @@ -1,26 +1,37 @@ #Routes configuration rapsyspack_captcha: - path: '/captcha/{hash<[a-zA-Z0-9=_-]+>}/{updated<\d+>}/{equation<[a-zA-Z0-9=_-]+>}/{width<\d+>?120}/{height<\d+>?36}.{!_format?jpeg}' - controller: Rapsys\PackBundle\Controller\ImageController::captcha + path: '/captcha/{hash<[a-zA-Z0-9=_-]+>}/{width<\d+>}/{height<\d+>}/{equation<[a-zA-Z0-9=_-]+>}.{!_format<(jpeg|png|webp)>?jpeg}' + controller: Rapsys\PackBundle\Controller::captcha + methods: GET + +rapsyspack_css: + path: '/bundles/rapsyspack/pack/css/{file<[a-zA-Z0-9]+>}.{!_format?css}' methods: GET -#TODO: replace this url with a redirection route ??? -#XXX: we don't need the mtime, maybe we can drop it in this redirect instead of apache ? rapsyspack_facebook: - path: '/bundles/rapsyspack/facebook/{mtime<\d+>}{path}.{!_format?jpeg}' + path: '/facebook/{hash<[a-zA-Z0-9=_-]+>}/{width<\d+>}/{height<\d+>}/{path<[a-zA-Z0-9=_-]+>}.{!_format<(jpeg|png|webp)>?jpeg}' + controller: Rapsys\PackBundle\Controller::facebook + methods: GET + +rapsyspack_img: + path: '/bundles/rapsyspack/pack/img/{file<[a-zA-Z0-9]+>}.{!_format<(jpeg|png|webp)>?jpeg}' + methods: GET + +rapsyspack_js: + path: '/bundles/rapsyspack/pack/js/{file<[a-zA-Z0-9]+>}.{!_format?js}' methods: GET rapsyspack_map: - path: '/map/{hash<[a-zA-Z0-9=_-]+>}/{updated<\d+>}/{latitude<\d+(\.?\d+)?>}/{longitude<\d+(\.?\d+)?>}/{zoom<\d+>?17}/{width<\d+>?640}/{height<\d+>?640}.{!_format?jpeg}' - controller: Rapsys\PackBundle\Controller\MapController::map + path: '/map/{hash<[a-zA-Z0-9=_-]+>}/{latitude<\d+(\.?\d+)>},{longitude<\d+(\.?\d+)>}-{zoom<\d+>}-{width<\d+>}x{height<\d+>}.{!_format<(jpeg|png|webp)>?jpeg}' + controller: Rapsys\PackBundle\Controller::map methods: GET -rapsyspack_multimap: - path: '/multimap/{hash<[a-zA-Z0-9=_-]+>}/{updated<\d+>}/{latitude<\d+(\.?\d+)?>}/{longitude<\d+(\.?\d+)?>}/{coordinates<(?:\d+(\.\d+)?,\d+(\.\d+)?(-\d+(\.\d+)?,\d+(\.\d+)?)*)?>}/{zoom<\d+>?15}/{width<\d+>?640}/{height<\d+>?640}.{!_format?jpeg}' - controller: Rapsys\PackBundle\Controller\MapController::multimap +rapsyspack_multi: + path: '/multi/{hash<[a-zA-Z0-9=_-]+>}/{coordinate<\d+(\.\d+)?,\d+(\.\d+)?(-\d+(\.\d+)?,\d+(\.\d+)?)+>}-{zoom<\d+>}-{width<\d+>}x{height<\d+>}.{!_format<(jpeg|png|webp)>?jpeg}' + controller: Rapsys\PackBundle\Controller::multi methods: GET rapsyspack_thumb: - path: '/thumb/{hash<[a-zA-Z0-9=_-]+>}/{updated<\d+>}/{path<[a-zA-Z0-9=_-]+>}/{width<\d+>?640}/{height<\d+>?640}.{!_format?jpeg}' - controller: Rapsys\PackBundle\Controller\ImageController::thumb + path: '/thumb/{hash<[a-zA-Z0-9=_-]+>}/{width<\d+>}/{height<\d+>}/{path<[a-zA-Z0-9=_-]+>}.{!_format<(jpeg|png|webp)>?jpeg}' + controller: Rapsys\PackBundle\Controller::thumb methods: GET -- 2.41.1