mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
[skip ci] proxy content-type header from API response to Next.js proxy response
This commit is contained in:
@@ -24,6 +24,7 @@ const handler = async(nextReq: NextApiRequest, nextRes: NextApiResponse) => {
|
||||
// proxy some headers from API
|
||||
nextRes.setHeader('x-request-id', apiRes.headers.get('x-request-id') || '');
|
||||
nextRes.setHeader('set-cookie', apiRes.headers.get('set-cookie') || '');
|
||||
nextRes.setHeader('content-type', apiRes.headers.get('content-type') || '');
|
||||
|
||||
nextRes.status(apiRes.status).send(apiRes.body);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user