Skip to content

Instantly share code, notes, and snippets.

@scottsb
Last active August 3, 2019 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottsb/d719678955f682cdaf872a64f0f9b809 to your computer and use it in GitHub Desktop.
Save scottsb/d719678955f682cdaf872a64f0f9b809 to your computer and use it in GitHub Desktop.
Quick Fix Module for Magento2 Issue #21299 (HEAD request returns 404)
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Framework\App\Request\HttpMethodMap">
<arguments>
<argument name="map" xsi:type="array">
<item name="OPTIONS" xsi:type="string">\Magento\Framework\App\Action\HttpOptionsActionInterface</item>
<item name="GET" xsi:type="string">\Magento\Framework\App\Action\HttpGetActionInterface</item>
<item name="HEAD" xsi:type="string">\Magento\Framework\App\Action\HttpGetActionInterface</item>
<item name="POST" xsi:type="string">\Magento\Framework\App\Action\HttpPostActionInterface</item>
<item name="PUT" xsi:type="string">\Magento\Framework\App\Action\HttpPutActionInterface</item>
<item name="PATCH" xsi:type="string">\Magento\Framework\App\Action\HttpPatchActionInterface</item>
<item name="DELETE" xsi:type="string">\Magento\Framework\App\Action\HttpDeleteActionInterface</item>
<item name="CONNECT" xsi:type="string">\Magento\Framework\App\Action\HttpConnectActionInterface</item>
<item name="PROPFIND" xsi:type="string">\Magento\Framework\App\Action\HttpPropfindActionInterface</item>
<item name="TRACE" xsi:type="string">\Magento\Framework\App\Action\HttpTraceActionInterface</item>
</argument>
</arguments>
</type>
</config>
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Ripen_HeadRequest404Bug" setup_version="1.0.0"/>
</config>
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Ripen_HeadRequest404Bug',
__DIR__
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment