Skip to content

API8: use TRACE instead of HEAD as the HTTP method to disable - #186

Open
cvas22 wants to merge 1 commit into
OWASP:masterfrom
cvas22:fix/api8-http-method-example
Open

cvas22 wants to merge 1 commit into
OWASP:masterfrom
cvas22:fix/api8-http-method-example

Conversation

@cvas22

@cvas22 cvas22 commented Nov 10, 2026

Copy link
Copy Markdown

API8's "How To Prevent" says to disable the HTTP verbs an API doesn't use and gives HEAD as the example. HEAD is the wrong one to pick: RFC 9110 section 9.1 says all general-purpose servers MUST support GET and HEAD, and most frameworks answer HEAD automatically for every GET route, so following the advice literally breaks caches, link checkers and health checks without any security gain. TRACE is the usual example of a method to turn off, since it reflects the request back and has been used to read cookies and auth headers.

This swaps the example to TRACE and adds a short note that HEAD should keep working wherever GET does, with the RFC linked. English 2023 edition only.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant