AllowedOrigins class sealed
Which origins a browser may call this server from.
A browser sends Origin and refuses the response unless the server names
that origin back. Everything else in CORS follows from that one exchange.
Constructors
- AllowedOrigins.any()
-
Any origin at all, answered as
*.constfactory - AllowedOrigins.matching(bool predicate(String origin))
-
Whatever
predicateaccepts, for a rule a list cannot express.constfactory -
AllowedOrigins.only(Set<
String> origins) -
Exactly these origins, compared case-sensitively as the specification
requires —
https://Example.comis nothttps://example.com.constfactory
Properties
Methods
-
headerFor(
String? origin) → String? -
What to answer for
origin, ornullto refuse it. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited