Reputation: 35
I have a few endpoints like below.
I am trying to add these in proxy config file as fixing cors error.
For single url it is working fine but for all url it is not working. What should i add object key here? As text/data is common in all url.
Correction after David Gerschcovsky's response.
{
"/text/*" : {
"secure": false,
"changeOrigin": true,
"logLevel": "debug",
"pathRewrite": {
"^/text/^": ""
}
}
}
How to add multiple entries with same object keys in this scenario?
Upvotes: 1
Views: 271
Reputation: 121
You are missing some parameters, try something like this:
{
"/text/*" : {
"target": "abc"
"secure": true,
"changeOrigin": true,
"pathRewrite": {
"^/api": ""
}
}
}
Upvotes: 2