Skip to content

Instantly share code, notes, and snippets.

@scottsb
Last active August 3, 2019 14:18
Embed
What would you like to do?
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