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

[policy] [cors] Error on call to api with policy CORS #464

Closed
vdelattre opened this Issue Feb 23, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@vdelattre

vdelattre commented Feb 23, 2017

Current Behavior

i put CORS policy on my api.
i deleted field Access-Control-Expose-Headers.
When i call api, it's OK, return 200

if modify CORS policy but other fied, like add another allowed method. when i call api, i have error 503:
in gateway log:
13:14:59.616 [vert.x-eventloop-thread-3] [] ERROR i.g.g.p.impl.ResponsePolicyChain - Unexpected error while running policy io.gravitee.gateway.policy.impl.PolicyImpl@55809251
java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gravitee.gateway.policy.impl.PolicyImpl.invoke(PolicyImpl.java:89)
at io.gravitee.gateway.policy.impl.PolicyImpl.onResponse(PolicyImpl.java:50)
at io.gravitee.gateway.policy.impl.ResponsePolicyChain.execute(ResponsePolicyChain.java:41)

when i look back on portal CORS policy and i delete expose Access-Control-Expose-Headers or fill field, call is OK

Your Environment

  • Version used: 1.3.3
@brasseld

This comment has been minimized.

Member

brasseld commented Feb 23, 2017

Hi @vdelattre

I think you did not provide the complete stack trace.
I do not see any trace about the CORS policy...
Are you able to provide us with the complete stack ?

@brasseld brasseld added the type: bug label Feb 23, 2017

@brasseld brasseld changed the title from [Portal] error on call to api with policy CORS to [policy][cors] Error on call to api with policy CORS Feb 23, 2017

@aelamrani aelamrani changed the title from [policy][cors] Error on call to api with policy CORS to [policy] [cors] Error on call to api with policy CORS Feb 27, 2017

brasseld added a commit to gravitee-io-community/gravitee-policy-cors that referenced this issue Feb 27, 2017

@brasseld brasseld self-assigned this Feb 27, 2017

NicolasGeraud added a commit to gravitee-io-community/gravitee-policy-cors that referenced this issue Feb 27, 2017

@NicolasGeraud NicolasGeraud added this to the 1.4.0 milestone Mar 2, 2017

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