apache / apisix

The Cloud-Native API Gateway
https://apisix.apache.org/blog/
Apache License 2.0
14.21k stars 2.48k forks source link

help request: Add Jwt-Plugin Return 400 Request Header Or Cookie Too Large #8406

Closed huanghuanghui closed 7 months ago

huanghuanghui commented 1 year ago

Description

I use [apisix-docker](https://github.com/apache/apisix-docker) docker-compose run apisix server,when i try to add jwt-auth,use this introduction [apisix-2.4-zh-plugins-jwt-auth](https://www.bookstack.cn/read/apisix-2.4-zh/plugins-jwt-auth.md). I curl this request /apisix/plugin/jwt/sign to get Authorization Key,Apisix response

image

Environment

monkeyDluffy6017 commented 1 year ago

It looks like that your dashboard(2.13) does not match your apisix(3.0.0) , use api instead of dashboard like https://www.bookstack.cn/read/apisix-2.4-zh/plugins-jwt-auth.md

NextStation commented 1 year ago

I got the same issue with the jwt-plugin, even though send the request "http://localhost:9080/apisix/plugin/jwt/sign?key=user-key in the container, the response is "400 Request Header Or Cookie Too Large" , check the access log , 1000 times of token-generate requests are sent in a second

now it is fixed, add plugin item "- public-api" to the apisix config.yaml, then restart the instance, the 400 error disappear!

tzssangglass commented 1 year ago

400 Request Header Or Cookie Too Large

try with: https://github.com/apache/apisix/issues/8081#issuecomment-1276959203

github-actions[bot] commented 7 months ago

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 dev@apisix.apache.org list. Thank you for your contributions.

monkeyDluffy6017 commented 7 months ago

considered resolved