Skip to content

Pass preflight request to upstream. Fixes gh-2472 #2582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tommas1988
Copy link
Contributor

Pass preflight request to upstream. Fixes issue 2472

@spencergibb
Copy link
Member

Sorry for the late reply. This needs to be opt-in since it is a change from the default behavior. Are you able to make that change?

@tommas1988
Copy link
Contributor Author

Are you able to make that chang

Sorry for the late reply. This needs to be opt-in since it is a change from the default behavior. Are you able to make that change?

Sorry I don`t get the meaning of 'opt-in'. What can I do with this PR ?

@spencergibb
Copy link
Member

It needs to be activated by a property. Other people rely on the current behavior. Those that want this new behavior need to opt in by setting a property. I'm asking if you can add that to the PR

@tommas1988
Copy link
Contributor Author

It needs to be activated by a property. Other people rely on the current behavior. Those that want this new behavior need to opt in by setting a property. I'm asking if you can add that to the PR

There is a boolean setting item named handle-preflight-request in route setting to control this behavior. And it is disabled by default.

@tommas1988
Copy link
Contributor Author

I will add some docs for this feature some time later

@tommas1988
Copy link
Contributor Author

tommas1988 commented Nov 17, 2022

After recalling the related bug and code review, I'm going to refactor the codes. It seems useless to implement PreFlightRequestFilter interface on every GatewayFilters

@tommas1988 tommas1988 force-pushed the pass-preflight-request-to-upstream branch from 6504fee to 983b5a4 Compare November 21, 2022 16:39
@tommas1988
Copy link
Contributor Author

PreFlightRequestFilter interface is still needed to allow only filters that affect route process to handle preflight request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The OPTIONS request cannot be forwarded to the service
3 participants