Skip to content

all: do not allow OPTIONS method in CORS config - #1223

Open
jub0bs wants to merge 1 commit into
modelcontextprotocol:mainfrom
jub0bs:main
Open

all: do not allow OPTIONS method in CORS config#1223
jub0bs wants to merge 1 commit into
modelcontextprotocol:mainfrom
jub0bs:main

Conversation

@jub0bs

@jub0bs jub0bs commented Sep 1, 2026

Copy link
Copy Markdown

Contrary to popular belief, listing OPTIONS as an allowed method in a server's CORS configuration is not necessary for CORS preflight to succeed. It is only required if server developers wish to allow clients to make explicit use of that method, e.g. via the following client code:

fetch('//example.com', {method: 'OPTIONS'})

This commit drops OPTIONS from the list of allowed methods throughout.

@jub0bs

jub0bs commented Sep 1, 2026

Copy link
Copy Markdown
Author

cc @orius123

(Thanks for recommending github.com/jub0bs/cors, by the way!)

Contrary to popular belief, listing OPTIONS as an allowed method in a
server's CORS configuration is not necessary for CORS preflight to
succeed. It is only required if server developers wish to allow clients
to make explicit use of that method, e.g. via the following client code:

  fetch('//example.com', {method: 'OPTIONS'})

This commit drops OPTIONS from the list of allowed methods throughout.
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