request-match
Use this entry to define the pattern to be matched against the HTTP request line, which includes method, URI, and protocol.
request-match = <request-line>
Description
This entry defines the pattern to be matched against the HTTP request line, which includes method, URI, and protocol.
We can also match a request using a host header. Use this option to selectively enable this function for a particular virtual host junction. To selectively match an entry based on a particular host header, add a prefix to the <request-line> with the string [<host>].
The CORS policy described in this stanza will be applied to any cross-origin or pre-flight requests which match these entries.
Options
request-line Contains the request line to be matched against. The pattern matching is case-sensitive. We can use wildcard characters * and ?.
Usage: Required.
We can specify multiple entries if needed.
Default value: None.
Example:
request-match = GET /index.html HTTP/1.1 request-match = GET /jct/* * request-match = [api.ibm.com]GET /login/*
Parent topic: [cors-policy:policy-name] stanza