CORS Error. Am I doing something wrong?

Every once in a while, I send GPT a prompt, and I will get no response. After getting tired of waiting, I can start sending it more prompts or repeat the last prompt, and start getting responses again like normal, but then my console logs the error from the ignored prompt

Access to fetch at 'https://api.openai.com/v1/chat/completions' from origin 'https://<mywebsite>.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.       
        
POST https://api.openai.com/v1/chat/completions net::ERR_FAILED 502 (Bad Gateway)

I’ve already added the following lines to .htaccess, so I assume this is something on OpenAI’s side?

Header set Access-Control-Allow-Origin https://openai.com
Header set Access-Control-Allow-Origin https://api.openai.com