How to safely allow PUT for single program in Apache 2.4

I am using Magento (version 2.2.5) and I seem to need to allow PUT requests for my server (at least for the Magento program).

For specifics, on Magento entering a discount code does not work on the checkout page fails "501 (Not Implemented)". However the discount code section does work in the shopping cart page. The difference seems to be that the shopping cart page uses GET method while the checkout page uses PUT method.

How do I enable PUT method to work for Magento? Is this something which can be done through .htaccess? If it needs to be done for the entire server, is there any security risk to allow PUT requests?

I have seen somewhere that this might be related to Apache's "mod_security". I am new at this and I do not want to expose the server to any potential vulnerabilities.

Thank you in advance.