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

拦截器,请求重发变成了 get ,[object object] #11425

Open
xyzabc0004 opened this issue Jan 16, 2025 · 1 comment
Open

拦截器,请求重发变成了 get ,[object object] #11425

xyzabc0004 opened this issue Jan 16, 2025 · 1 comment

Comments

@xyzabc0004
Copy link

各位老师,请教一个问题。ant design pro 401拦截后,重新请求post变成成了get,如下

Image

改成这种方式:

Image

npm run start:dev下是可以,有新发起,npm run build后放到nginx里面,又出现同样的问题了,也奕成了get ,[object oject]。

还请老师们指点下。

@xyzabc0004
Copy link
Author

xyzabc0004 commented Jan 16, 2025

经过无数次的测试,发现要请求下,在浏览器里面get下这个地址:http://localhost:8000/mybook 会下载些JS,
然后再401,就可以自动再请求了。
请求到服务器url 是http://localhost:8000/api打头的。

也不知道哪里可以配置这个问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant