-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
request help: no cors header return sometimes #3407
Comments
I can't see the word in your images. |
It's just a browser request list, sometime no cors header return, but not always. like this |
What you said is not a reproducible steps. I can't follow your word to create an environment to reproduce the issue, so I can't help you to solve the problem. |
For the "sometimes" problem, you should add more log in the cors plugin, to see what happened when the error occurs. apisix/apisix/plugins/cors.lua Line 168 in 8904011
You should log down the ctx.conf_type , ctx.conf_id and returned multiple_origin .
|
@rogerogers Also, the configuration like Route, Upstream of APISIX should be provided here. |
Here is the metadata in etcd
|
code
logs
Seems no log when situation occurred |
So you mean when error occurs, the |
Have you solved this problem? I meet the same problem |
I add log to the cors plugin, when the error occurred _M.rewrite will run. _M.header_filter and set headers not run @spacewander |
@jinyuxiaoqiang |
apisix version: 2.2 |
I have reproduced this problem.After create global_plugin through dashboard, I delete this global_plugin.It remains something in etcd,then the problem will sometime occurred. /global_rules/1 |
I can’t figure out how it leads to the problem. Can you give me some instructions? |
Can this be reproduced with APISIX 2.9 or higher? |
This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions. |
This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time. |
no cors header return sometimes
Environment
built by gcc 10.2.1 20201016 (Red Hat 10.2.1-6) (GCC)
built with OpenSSL 1.1.1h 22 Sep 2020 (running with OpenSSL 1.1.1i 8 Dec 2020)
Minimal test code / Steps to reproduce the issue
wrong header

right header

my cors config in a service group
{ "allow_credential": true, "allow_headers": "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Arg-Id", "allow_methods": "GET,POST,OPTIONS", "allow_origins": "http://m-local.guess.com,http://www-local.guess.com", "disable": false, "expose_headers": "Authorization" }
The text was updated successfully, but these errors were encountered: