#2075 Fix Draw Things auth
This commit is contained in:
parent
4f83782430
commit
8ae9212cc5
|
@ -684,15 +684,17 @@ drawthings.post('/generate', jsonParser, async (request, response) => {
|
|||
const url = new URL(request.body.url);
|
||||
url.pathname = '/sdapi/v1/txt2img';
|
||||
|
||||
const body = {...request.body};
|
||||
const body = { ...request.body };
|
||||
const auth = getBasicAuthHeader(request.body.auth);
|
||||
delete body.url;
|
||||
delete body.auth;
|
||||
|
||||
const result = await fetch(url, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(body),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': getBasicAuthHeader(request.body.auth),
|
||||
'Authorization': auth,
|
||||
},
|
||||
timeout: 0,
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue