Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

💊 fix: OpenID proxy support for downloading profile pictures (#3263)

Marco Berettae76777d29884
diff --git a/api/strategies/openidStrategy.js b/api/strategies/openidStrategy.js
index 794a38778d..2beeaa13eb 100644
--- a/api/strategies/openidStrategy.js
+++ b/api/strategies/openidStrategy.js
@@ -25,12 +25,18 @@ const downloadImage = async (url, accessToken) => {
}
try {
- const response = await fetch(url, {
+ const options = {
method: 'GET',
headers: {
Authorization: `Bearer ${accessToken}`,
},
- });
+ };
+
+ if (process.env.PROXY) {
+ options.agent = new HttpsProxyAgent(process.env.PROXY);
+ }
+
+ const response = await fetch(url, options);
if (response.ok) {
const buffer = await response.buffer();