Merge branch 'staging' into neo-server

This commit is contained in:
Cohee
2024-04-13 20:06:47 +03:00
2 changed files with 26 additions and 7 deletions

View File

@ -684,14 +684,16 @@ drawthings.post('/generate', jsonParser, async (request, response) => {
url.pathname = '/sdapi/v1/txt2img';
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,
});