[FIX] website: set multilang to `False`on `website_image`
Add multilang=False to website_image controller to prevent redirects Because website_image is decorated with website=True Requests made for the product image at `/website/image/product.template/xx_xx/..` triggered redirections to add the language code to the requests URLs. This redirection was useless, as setting the language code for images is non-sense. Adding `websitelang=False` prevents this redirection. In addition, the redirection could lead to SSL security concerns, as the redirection could use the http:// scheme. Closes #8515
This commit is contained in:
parent
2b1cdd551f
commit
40c35fb48a
|
@ -378,7 +378,7 @@ class Website(openerp.addons.web.controllers.main.Home):
|
|||
'/website/image',
|
||||
'/website/image/<model>/<id>/<field>',
|
||||
'/website/image/<model>/<id>/<field>/<int:max_width>x<int:max_height>'
|
||||
], auth="public", website=True)
|
||||
], auth="public", website=True, multilang=False)
|
||||
def website_image(self, model, id, field, max_width=None, max_height=None):
|
||||
""" Fetches the requested field and ensures it does not go above
|
||||
(max_width, max_height), resizing it if necessary.
|
||||
|
|
Loading…
Reference in New Issue