]> Raphaël G. Git Repositories - packbundle/commitdiff
Force jpeg format route parameter 0.2.3
authorRaphaël Gertz <git@rapsys.eu>
Fri, 13 Jan 2023 02:14:26 +0000 (03:14 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Fri, 13 Jan 2023 02:14:26 +0000 (03:14 +0100)
Resources/config/routes/rapsys_pack.yaml

index c9ad80af9b8a7b29e9b43513f50533b1cbffaaa1..72d3a271ce21bcba849eb270ad0da68d42f8e58f 100644 (file)
@@ -1,24 +1,26 @@
 #Routes configuration
 rapsys_pack_captcha:
 #Routes configuration
 rapsys_pack_captcha:
-    path: '/captcha/{hash<[a-zA-Z0-9=_-]+>}/{updated<\d+>}/{equation<[a-zA-Z0-9=_-]+>}/{width<\d+>?120}/{height<\d+>?36}.{_format?jpeg}'
+    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
     methods: GET
 
     controller: Rapsys\PackBundle\Controller\ImageController::captcha
     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 ?
 rapsys_pack_facebook:
     path: '/bundles/rapsyspack/facebook/{mtime<\d+>}{path</.*>}.{!_format?jpeg}'
     methods: GET
 
 rapsys_pack_map:
 rapsys_pack_facebook:
     path: '/bundles/rapsyspack/facebook/{mtime<\d+>}{path</.*>}.{!_format?jpeg}'
     methods: GET
 
 rapsys_pack_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}'
+    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
     methods: GET
 
 rapsys_pack_multimap:
     controller: Rapsys\PackBundle\Controller\MapController::map
     methods: GET
 
 rapsys_pack_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}'
+    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
     methods: GET
 
 rapsys_pack_thumb:
     controller: Rapsys\PackBundle\Controller\MapController::multimap
     methods: GET
 
 rapsys_pack_thumb:
-    path: '/thumb/{hash<[a-zA-Z0-9=_-]+>}/{updated<\d+>}/{path<[a-zA-Z0-9=_-]+>}/{width<\d+>?640}/{height<\d+>?640}.{_format?jpeg}'
+    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
     methods: GET
     controller: Rapsys\PackBundle\Controller\ImageController::thumb
     methods: GET