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

dangerouslyApiKey 为动态情况,出现请求authorization 不变情况 #413

Open
gehuama opened this issue Dec 26, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@gehuama
Copy link

gehuama commented Dec 26, 2024

重现步骤

在线示例链接:(必填)

步骤:
1.const { create } = XRequest({ baseURL: baseURL + PATH, dangerouslyApiKey });
2.dangerouslyApiKey 是一个动态的
3.

当前行为

dangerouslyApiKey 为动态的,第一次发送成功,再次发送,改变dangerouslyApiKey 的值,此时请求authorization:仍旧是上一次的,再次请求就发生改变了

预期行为

angerouslyApiKey 改变,请求时,authorization发生改变

上下文

No response

版本

1.0.2

您在哪些浏览器上遇到了这个问题?

No response

@gehuama gehuama added the bug Something isn't working label Dec 26, 2024
@gehuama gehuama changed the title dangerouslyApiKey 为动态的,第一次发送成功,再次发送,改变dangerouslyApiKey 的值,此时请求authorization:仍旧是上一次的,再次请求就发生改变了 dangerouslyApiKey 为动态情况,出现请求authorization 不变情况 Dec 26, 2024
@gehuama
Copy link
Author

gehuama commented Dec 26, 2024

1735209500760

@YumoImer
Copy link
Collaborator

之前确实没有考虑到有动态设置 ApiKey 的情况,感谢反馈,我会在下个版本修复这个问题。

@gehuama
Copy link
Author

gehuama commented Dec 27, 2024

之前确实没有考虑到有动态设置 ApiKey 的情况,感谢反馈,我会在下个版本修复这个问题。

今天只能写了一个自定义fetch 来进行区分,实现对应功能

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants