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

[Bug] 设置了code后出现 json TypeError: Can't modify immutable headers. #1746

Closed
myqlrs opened this issue May 25, 2023 · 13 comments
Closed

Comments

@myqlrs
Copy link

myqlrs commented May 25, 2023

部署在vercel上并设置了code和api后,访问时只设置code出现 json TypeError: Can't modify immutable headers. [这个错,输入api可正常使用
image

@Yidadaa
Copy link
Collaborator

Yidadaa commented May 25, 2023

不要设置 PROTOCOL 环境变量。

@Yidadaa Yidadaa closed this as completed May 25, 2023
@schoolfamer
Copy link

不要设置 PROTOCOL 环境变量。

俺也遇到了这个问题。俺的环境变量里面只配置了OPENAI_API_KEY和CODE
求大佬解惑

@yuanj82
Copy link

yuanj82 commented May 25, 2023

我使用了API2D的key,也是这样,API2D是一个代理的APIkey

@Zvirtuosity
Copy link

Zvirtuosity commented May 25, 2023

不要设置 PROTOCOL 环境变量。

我也碰到了一样的问题!只配置了OPENAI_API_KEY和CODE

@andyweidong
Copy link

andyweidong commented May 25, 2023

同上,都遇到了这个问题,什么也没配置,也会报TypeError: Can't modify immutable headers.

@YeZhaoZhao
Copy link

+1 TypeError: Can't modify immutable headers.

@schoolfamer
Copy link

我发现我只有在使用自定义域名的时候才会报错,vercel的域名正常。不知道其他几位是不是也一样的遭遇

@andyweidong
Copy link

@myqlrs 你的报错问题解决了吗

@myqlrs
Copy link
Author

myqlrs commented May 25, 2023

@myqlrs 你的报错问题解决了吗

没有,我把CODE去了,就正常使用了,一加上CODE就不行

@Zvirtuosity
Copy link

不要设置 PROTOCOL 环境变量。

我也碰到了一样的问题!只配置了OPENAI_API_KEY和CODE

我解决了!是配置错了环境变了里的key

  1. 检查设置里的api key,是不是填错了!
  2. 检查服务里的环境变量,是不是填错了!
    优先级,应该是聊天页里填的code和api key,然后再到环境变量里的key

Yidadaa added a commit that referenced this issue May 25, 2023
fix: #1746 Can't modify immutable headers.
@Yidadaa
Copy link
Collaborator

Yidadaa commented May 25, 2023

新版代码已经修复该问题,手动同步代码即可。

jinker pushed a commit to jinker/ChatGPT-Next-Web that referenced this issue Jun 19, 2023
@Kevin-free
Copy link

code 和 API key 都需要设置才可用吗? 我怎么记得之前只设置 code 就可以,现在两个都要设置

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Do both code and API key need to be set to be available? How do I remember that I only need to set the code before, but now I need to set both

alchemist139 pushed a commit to alchemist139/ChatGPT-Next-Web that referenced this issue Sep 21, 2023
alchemist139 pushed a commit to alchemist139/ChatGPT-Next-Web that referenced this issue Sep 21, 2023
gaogao1030 pushed a commit to gaogao1030/ChatGPT-Next-Web that referenced this issue May 16, 2024
gaogao1030 pushed a commit to gaogao1030/ChatGPT-Next-Web that referenced this issue May 16, 2024
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

9 participants