DEV: Disable PATCH requests (#13928)

DEV: Disable PATCH requests (#13928)

We aren’t actually calling any of the PATCH requests, so maybe we should just stick with PUT unless we explicitly need PATCH for something.

diff --git a/config/routes.rb b/config/routes.rb
index fd833b8..61c78af 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -8,6 +8,8 @@ USERNAME_ROUTE_FORMAT = /[%\w.\-]+?/ unless defined? USERNAME_ROUTE_FORMAT
 BACKUP_ROUTE_FORMAT = /.+\.(sql\.gz|tar\.gz|tgz)/i unless defined? BACKUP_ROUTE_FORMAT
 
 Discourse::Application.routes.draw do
+  def patch(*) end # Disable PATCH requests
+
   scope path: nil, constraints: { format: /(json|html|\*\/\*)/ } do
     relative_url_root = (defined?(Rails.configuration.relative_url_root) && Rails.configuration.relative_url_root) ? Rails.configuration.relative_url_root + '/' : '/'
 

GitHub sha: 413de9361ffb7ec5f5cda67c97e5e2a351eec58e

This commit appears in #13928 which was approved by ZogStriP. It was merged by blake.