mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Exclude DELETE
methods from invalid request with payload.
Follow-up 105d560177
Our client side code is sending params as part of the request payload so
that is going to be tricky to fix.
This commit is contained in:
parent
eb61916e23
commit
fe83baa9b3
@ -307,7 +307,7 @@ module Middleware
|
|||||||
@app = app
|
@app = app
|
||||||
end
|
end
|
||||||
|
|
||||||
PAYLOAD_INVALID_REQUEST_METHODS = ["GET", "DELETE", "HEAD"]
|
PAYLOAD_INVALID_REQUEST_METHODS = ["GET", "HEAD"]
|
||||||
|
|
||||||
def call(env)
|
def call(env)
|
||||||
if PAYLOAD_INVALID_REQUEST_METHODS.include?(env[Rack::REQUEST_METHOD]) &&
|
if PAYLOAD_INVALID_REQUEST_METHODS.include?(env[Rack::REQUEST_METHOD]) &&
|
||||||
|
Loading…
Reference in New Issue
Block a user