Skip to content
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

reorder config application #3509

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

Conversation

KowalczykBartek
Copy link
Contributor

Description

Because of current order of filters:

http_filters : [ext_auth, envoy.filters.http.cors, envoy.filters.http.router]

when ext_auth returns 4xx (or it fails because of whatever other reasons) the cors handler is not called and no cors headers are injected (for example access-control-allow-origin) - because of that browser is not able to handle such response gently.
I first tested if reordering of these filters will help, using plain envoy, and following configuration gave me expected result - cors where injected even if ext-auth returned 4xx (it makes sense because cors is handled first)

http_filters:
  - name: envoy.filters.http.cors
  - name: envoy.filters.http.ext_authz
    typed_config:
      "@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz
      http_service:
          server_uri:
            uri: 172.17.0.2:8080
            cluster: ext-authz
            timeout: 2.25s
  - name: envoy.filters.http.router

then I tried do the same with Ambassador Intermediate Representation - and It also works.

Testing

Tested on stage env (kubernetes).

Checklist

I am not filling this section yet.

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

Successfully merging this pull request may close these issues.

1 participant