Help Wanted: rewrite for proxy not working

isuke01
10
isuke01
commented 6 months ago

Hey, My sitemaps are generated by backend which is in another domain.
I would like to access my sitemaps frontend.com/sitemap.xml … etc instead of backend.com/sitemap.xml
So I created:
"/sitemap": { "target": apiDomain, pathRewrite: { '^sitemap/^sitemap(-+([a-zA-Z0-9_-]+))?\.xml(\.gz)?$' : '/sitemap$1.xml$2' }, "secure": process.env.NODE_ENV !== 'development', "changeOrigin": true }
But no luck with my code :/

0
Informations
QuestionUnresolved
#c51 - Created 6 months ago