squeezr-ai 1.11.3 → 1.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server.js +2 -14
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -236,20 +236,8 @@ app.get('/squeezr/expand/:id', (c) => {
|
|
|
236
236
|
app.all('*', async (c) => {
|
|
237
237
|
const upstream = detectUpstream(c.req.raw.headers);
|
|
238
238
|
const url = new URL(c.req.url);
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
let finalUpstream = upstream;
|
|
242
|
-
if (url.pathname === '/responses') {
|
|
243
|
-
const isOAuth = auth && !auth.startsWith('sk-');
|
|
244
|
-
if (isOAuth) {
|
|
245
|
-
finalUpstream = 'https://chatgpt.com/backend-api';
|
|
246
|
-
targetPath = '/responses';
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
targetPath = '/v1/responses';
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
const targetUrl = `${finalUpstream}${targetPath}${url.search}`;
|
|
239
|
+
const targetPath = url.pathname === '/responses' ? '/v1/responses' : url.pathname;
|
|
240
|
+
const targetUrl = `${upstream}${targetPath}${url.search}`;
|
|
253
241
|
const body = await c.req.arrayBuffer();
|
|
254
242
|
const fwdHeaders = forwardHeaders(c.req.raw.headers);
|
|
255
243
|
const resp = await fetch(targetUrl, {
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.11.
|
|
1
|
+
export declare const VERSION = "1.11.4";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.11.
|
|
1
|
+
export const VERSION = '1.11.4';
|
package/package.json
CHANGED