proxy only what is in router property, rest ignore #829
Unanswered
DaliborTrampota
asked this question in
Q&A
Replies: 1 comment 2 replies
-
To decide which request to proxy or not (ignore or allow), you can use context-matching (v2) or pathFilter (v3): v2: https://github.com/chimurai/http-proxy-middleware/blob/v2.0.6/recipes/context-matching.md |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm having issues with setting up the proxy.
I host site and now cdn on the same machine I want the cdn to have cdn subdomain so I proxy it like so. It works but when I visit the page at https.//koknut.xyz it does not work and says "Must provide a proper URL as target" so I figured that I have to add target property so I did 'https://koknut.xyz' but now it says this "[HPM] Error occurred while proxying request koknut.xyz/images/KokNutLogo.png to https://144.172.70.52/ [CERT_HAS_EXPIRED]" I dont know if my cert has expired or not but without the proxy, my https works just fine and so does the site. Why it cant just ignore all other paths/hosts and only proxy the router defined ones?
I want to proxy only /api/webho... and cdn.koknut.xyz
Beta Was this translation helpful? Give feedback.
All reactions