Commit 2ed81330 authored by tom's avatar tom

[skip ci] proxy content-type header from API response to Next.js proxy response

parent dc83febb
......@@ -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);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment