Skip to content

OSDOCS-21849: Documented the CORS filter in Gateway API docs - #119213

Open
dfitzmau wants to merge 1 commit into
openshift:mainfrom
dfitzmau:OSDOCS-21849
Open

OSDOCS-21849: Documented the CORS filter in Gateway API docs#119213
dfitzmau wants to merge 1 commit into
openshift:mainfrom
dfitzmau:OSDOCS-21849

Conversation

@dfitzmau

@dfitzmau dfitzmau commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Version(s):
5.0

Issue:
OSDOCS-21849

Link to docs preview:

  • SME has approved this change (Grant Spence).
  • QE has approved this change (Ishmam Amin).

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 2, 2026
@openshift-ci-robot

openshift-ci-robot commented Sep 2, 2026

Copy link
Copy Markdown

@dfitzmau: This pull request references OSDOCS-21849 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target either version "5.1.0." or "openshift-5.1.0.", but it targets "openshift-5.0" instead.

Details

In response to this:

Version(s):
5.0

Issue:
OSDOCS-21849

Link to docs preview:

  • SME has approved this change.
  • QE has approved this change.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 2, 2026
@ocpdocs-previewbot

ocpdocs-previewbot commented Sep 2, 2026

Copy link
Copy Markdown

@gcs278

gcs278 commented Sep 2, 2026

Copy link
Copy Markdown

i'll take a look from a NID Team side
/assign

@gcs278 gcs278 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally no issue from me, just two nits.

Content looks good.

Available on {SMProductName}, this extended filter modifies an HTTP request’s hostname, path, or both. It may not be used in combination with the requestRedirect filter. However, the path semantics for requestRedirect can also be used for urlRewrite, i.e. (type: replaceFullPath | replacePrefixMatch, string values for replaceFullPath or replacePrefixMatch).

`cors`::
Available on {SMProductName} and this extended filter configures Cross-Origin Resource Sharing (CORS). CORS lets a browser permit a web application from one origin to access resources from a different origin. Use a CORS filter when a browser-based application needs to request resources from a different origin. The gateway applies the policy and answers preflight requests directly, so your backend services do not have to implement CORS themselves. Fields include `allowOrigins`, `allowMethods`, `allowHeaders`, `exposeHeaders`, `allowCredentials`, and `maxAge`. For information, see "Cross-Origin Resource Sharing".

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just fyi, the backticks are fine with me, but there is inconsistency in the docs, urlRewrite above lists various fields like requestRedirect, or replaceFullPath without ``. It's Doc's team call on how you want to format, it seems to me that backticks are preferred when talking about a field name.

Feel free to handle as a follow up fix if you think it's worth it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️

Available on {SMProductName}, this extended filter modifies an HTTP request’s hostname, path, or both. It may not be used in combination with the requestRedirect filter. However, the path semantics for requestRedirect can also be used for urlRewrite, i.e. (type: replaceFullPath | replacePrefixMatch, string values for replaceFullPath or replacePrefixMatch).

`cors`::
Available on {SMProductName} and this extended filter configures Cross-Origin Resource Sharing (CORS). CORS lets a browser permit a web application from one origin to access resources from a different origin. Use a CORS filter when a browser-based application needs to request resources from a different origin. The gateway applies the policy and answers preflight requests directly, so your backend services do not have to implement CORS themselves. Fields include `allowOrigins`, `allowMethods`, `allowHeaders`, `exposeHeaders`, `allowCredentials`, and `maxAge`. For information, see "Cross-Origin Resource Sharing".

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a typo?

Suggested change
Available on {SMProductName} and this extended filter configures Cross-Origin Resource Sharing (CORS). CORS lets a browser permit a web application from one origin to access resources from a different origin. Use a CORS filter when a browser-based application needs to request resources from a different origin. The gateway applies the policy and answers preflight requests directly, so your backend services do not have to implement CORS themselves. Fields include `allowOrigins`, `allowMethods`, `allowHeaders`, `exposeHeaders`, `allowCredentials`, and `maxAge`. For information, see "Cross-Origin Resource Sharing".
Available on {SMProductName}, this extended filter configures Cross-Origin Resource Sharing (CORS). CORS lets a browser permit a web application from one origin to access resources from a different origin. Use a CORS filter when a browser-based application needs to request resources from a different origin. The gateway applies the policy and answers preflight requests directly, so your backend services do not have to implement CORS themselves. Fields include `allowOrigins`, `allowMethods`, `allowHeaders`, `exposeHeaders`, `allowCredentials`, and `maxAge`. For information, see "Cross-Origin Resource Sharing".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️

@dfitzmau
dfitzmau force-pushed the OSDOCS-21849 branch 2 times, most recently from 07d4922 to dd9fd1e Compare September 3, 2026 08:18
Comment on lines +23 to +24
`requestMirror`::
Available on {SMProductName}, this extended filter mirrors (i.e. sends a duplicate) requests to specified destinations (backendRef). Fields include: backendRef, and the optional percent or fraction to specify the portion of requests that should be mirrored. If neither percent nor fraction are specified, then 100% of requests are mirrored.
Available on {SMProductName}, this extended filter mirrors, sends duplicate, requests to specified destinations (`backendRef`). Fields include: `backendRef`, and the optional percent or fraction to specify the portion of requests that should be mirrored. If neither percent nor fraction are specified, then 100% of requests are mirrored.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Available on {SMProductName}, this extended filter mirrors, sends duplicate, requests to specified destinations

not sure if this update was intentional, but this feels like awkward sentence structure. I felt like the (i.e. sends a duplicate) made sense as a parenthetical, maybe (sends duplicate) is what you are going for? let me know if I'm misunderstanding

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a rule about parenthesis but as it is legacy content, I'll leave it in.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah TIL. got it, thanks

@gcs278

gcs278 commented Sep 3, 2026

Copy link
Copy Markdown

thanks for the quick responses!
/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 3, 2026
@openshift-ci

openshift-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

@dfitzmau: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Labels

branch/enterprise-5.0 jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants