From 4fa50ebe5339674bdad2fcf94f288ba63a7b1def Mon Sep 17 00:00:00 2001 From: Simon Schick Date: Tue, 18 Mar 2014 10:52:42 +0100 Subject: [PATCH] Added workaround for Firefox not sending LINK in uppercase what then is denied by nginx. More info: http://stackoverflow.com/questions/9645037/nginx-rejects-custom-http-methods-if-not-all-upper-case --- Resources/views/layout.html.twig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Resources/views/layout.html.twig b/Resources/views/layout.html.twig index e849912..66ea3b0 100644 --- a/Resources/views/layout.html.twig +++ b/Resources/views/layout.html.twig @@ -386,6 +386,12 @@ endpoint = $('#api_endpoint').val(); } + // Workaround for Firefox bug and a thereby resulting nginx incompatibility + if (method == "LINK") { + method = "POST"; + params._method = "LINK"; + } + // prepare final parameters var body = {}; if(bodyFormat == 'json' && method != 'GET') {