MCPcopy Create free account
hub / github.com/encode/starlette / allow_explicit_origin

Method allow_explicit_origin

starlette/middleware/cors.py:175–177  ·  view source on GitHub ↗
(headers: MutableHeaders, origin: str)

Source from the content-addressed store, hash-verified

173
174 @staticmethod
175 def allow_explicit_origin(headers: MutableHeaders, origin: str) -> None:
176 headers["Access-Control-Allow-Origin"] = origin
177 headers["Vary"] = ", ".join([*headers.getlist("Vary"), "Origin"])

Callers 1

sendMethod · 0.95

Calls 1

getlistMethod · 0.45

Tested by

no test coverage detected