Replies: 1 comment 6 replies
-
I'm not really familiar with NestJS. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So I want to proxy all requests that hit my nestjs backend on a certain path to another webserver (and have that path removed). But once I specify a path for the proxy, the proxying doesn't work anymore.
To test this, I run a simple angular application on localhost:4200 and my nestjs-backend runs on localhost:3000. This code works:
reverse-proxy-middleware.ts
app.module.ts
But once I specify a path like
.forRoutes('/proxy')
, the browser won't load the scripts and styles anymore. I can reach the base-page but no modules ever get loaded. I tried to change the<base href="/proxy">
in the angular app, tried to addpathRewrite: {'^/proxy': ''}
orignorePath: true
to the middleware configuration but nothing works. Is there a way to proxy all the requests from http://localhost:3000/proxy just to http://localhost:4200 and also load all the scripts and modules properly?Thanks for help already
Beta Was this translation helpful? Give feedback.
All reactions