Using the '@nestjs/serve-static' package and serving my static html file with it. After I set up the global prefix to my application, I can not reach my served root as I expected.
I couldn't find any documention/post about this issue.
As we can see from the images:
Tested with Fastify and Express as well, doesn't seem to work with either of them.
Is there an existing issue for this?
Current behavior
Using the '@nestjs/serve-static' package and serving my static html file with it. After I set up the global prefix to my application, I can not reach my served root as I expected.
I couldn't find any documention/post about this issue.
As we can see from the images:
Tested with Fastify and Express as well, doesn't seem to work with either of them.
Minimum reproduction code
https://github.com/Bidghur/static-serve-issue
Steps to reproduce
Expected behavior
When I hit http://localhost:3000/globalprefix/static/example I should receive my static assets.
So the globalprefix should be added to my serve root path url.
Package
Other package
@nestjs/serve-static
NestJS version
9.4.3
Packages versions
Node.js version
18.9.0
In which operating systems have you tested?
Other
No response