diff --git a/js/lib/App.js b/js/lib/App.js index 03b74f3f0..f75af8e42 100644 --- a/js/lib/App.js +++ b/js/lib/App.js @@ -191,11 +191,11 @@ export default class App { options.background = options.background || true; // If the method is something like PATCH or DELETE, which not all servers - // support, then we'll send it as a POST request with a the intended method - // specified in the X-Fake-Http-Method header. + // and clients support, then we'll send it as a POST request with the + // intended method specified in the X-HTTP-Method-Override header. if (options.method !== 'GET' && options.method !== 'POST') { const method = options.method; - extend(options, 'config', (result, xhr) => xhr.setRequestHeader('X-Fake-Http-Method', method)); + extend(options, 'config', (result, xhr) => xhr.setRequestHeader('X-HTTP-Method-Override', method)); options.method = 'POST'; } diff --git a/src/Api/Middleware/FakeHttpMethods.php b/src/Api/Middleware/FakeHttpMethods.php index 1ab514a5a..e397f8fd3 100644 --- a/src/Api/Middleware/FakeHttpMethods.php +++ b/src/Api/Middleware/FakeHttpMethods.php @@ -16,7 +16,7 @@ use Zend\Stratigility\MiddlewareInterface; class FakeHttpMethods implements MiddlewareInterface { - const HEADER_NAME = 'x-fake-http-method'; + const HEADER_NAME = 'x-http-method-override'; /** * {@inheritdoc}