T1ckbase commited on
Commit
c28b31a
·
1 Parent(s): 52f6b1b
Files changed (1) hide show
  1. main.ts +1 -2
main.ts CHANGED
@@ -86,7 +86,7 @@ app.post('/v1/chat/completions', async (c) => {
86
 
87
  app.post('/v1/images/generations', async (c) => {
88
  const headers = new Headers(c.req.raw.headers);
89
- // headers.delete('Authorization');
90
  headers.has('x-use-cache') || headers.set('x-use-cache', 'false');
91
  console.log('headers:', Object.fromEntries(headers));
92
 
@@ -121,7 +121,6 @@ app.post('/v1/images/generations', async (c) => {
121
  if (!response.ok) return response;
122
 
123
  const contentType = response.headers.get('content-type')!;
124
- const ext = contentType.substring('image/'.length).toLowerCase();
125
  const imageArrayBuffer = await response.arrayBuffer();
126
  const imageData = new Uint8Array(imageArrayBuffer);
127
 
 
86
 
87
  app.post('/v1/images/generations', async (c) => {
88
  const headers = new Headers(c.req.raw.headers);
89
+ headers.delete('Authorization');
90
  headers.has('x-use-cache') || headers.set('x-use-cache', 'false');
91
  console.log('headers:', Object.fromEntries(headers));
92
 
 
121
  if (!response.ok) return response;
122
 
123
  const contentType = response.headers.get('content-type')!;
 
124
  const imageArrayBuffer = await response.arrayBuffer();
125
  const imageData = new Uint8Array(imageArrayBuffer);
126