前后端分离的项目统一经openresty认证 #37
Valdanitooooo
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
问题
openresty中做认证校验,后端api gateway中也有认证校验,认证过了前端,访问不了后端,认证过了后端,访问不了前端
解决办法
在openresty认证后,取出access token,将它加到请求头里
lua代码:
nginx配置文件中
开放/auth访问,其他路径需要经过认证
这样前后端分离的项目可以统一经过openresty认证
Beta Was this translation helpful? Give feedback.
All reactions