strip out set-cookie header in proxied request responses

This commit is contained in:
wea_ondara
2023-09-27 18:20:18 +02:00
parent 92cb97a7d2
commit 169ab97050

View File

@@ -27,11 +27,21 @@ export default defineConfig({
'/graphql': { '/graphql': {
target: 'https://graphql.anilist.co', target: 'https://graphql.anilist.co',
changeOrigin: true, changeOrigin: true,
configure: (proxy, options) => {
proxy.on('proxyRes', proxyRes => {
delete proxyRes.headers['set-cookie'];
});
},
}, },
'^/mangaupdates/.*$': { '^/mangaupdates/.*$': {
target: 'https://api.mangaupdates.com', target: 'https://api.mangaupdates.com',
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/mangaupdates/, ''), rewrite: (path) => path.replace(/^\/mangaupdates/, ''),
configure: (proxy, options) => {
proxy.on('proxyRes', proxyRes => {
delete proxyRes.headers['set-cookie'];
});
},
}, },
}, },
}, },