Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Ignore a missing Content-Type header for a DELETE method request

Aaron Contreras7e26c8b2f300
diff --git a/lib/api/root_api.rb b/lib/api/root_api.rb
index 8865fd187a1..60ed908f792 100644
--- a/lib/api/root_api.rb
+++ b/lib/api/root_api.rb
@@ -91,8 +91,8 @@ module API
end
def enforce_content_type
- # Content-Type is not present in GET
- return if request.get?
+ # Content-Type is not present in GET or DELETE requests
+ return if request.get? || request.delete?
# Raise if missing header
content_type = request.content_type