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

生产环境下获取不到headers #15

Closed
hsiangleev opened this issue Apr 2, 2021 · 3 comments · Fixed by #23
Closed

生产环境下获取不到headers #15

hsiangleev opened this issue Apr 2, 2021 · 3 comments · Fixed by #23
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@hsiangleev
Copy link

请问为什么开发环境下可以拿到headers,生产环境下没有,可以在生产环境拿到headers吗

@anncwb anncwb added the bug Something isn't working label Apr 2, 2021
@xiaoxian521
Copy link
Contributor

mockjs拦截了ajax请求,通过服务开启的mock是可以在network中看到请求的,生产环境下是直接创建mock数据看不到请求,这本身就是mockjs的特性,并不是bug吧

@anncwb
Copy link
Collaborator

anncwb commented Apr 3, 2021

是的,确认了下,生产环境拿不到headers和restful接口的参数

@anncwb anncwb added the help wanted Extra attention is needed label Apr 3, 2021
@hsiangleev
Copy link
Author

@xiaoxian521 没有说是bug,我的意思是能不能加一个功能可以让生产环境获取headers

anncwb pushed a commit that referenced this issue May 29, 2021
* fix: loss request headers in PROD mode

修复生产模式下无法获取request headers数据的问题

fix: #15

* fix: change headers key to lowercase as DEV mode

修改生产环境下得到的request headers的key的大小写,使之与开发环境相同
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants