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.
This commit is contained in:
parent
5c6e7e3401
commit
413de9361f
|
@ -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 + '/' : '/'
|
||||
|
||||
|
|
Loading…
Reference in New Issue