-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App prefix #159
Comments
I'm not sure I understand your issue. Using For example, setting Are you encountering a problem with this behaviour? |
setGlobalPrefix does not apply the admin endpoint.. |
But my question is whether you can define a different prefix for the admin module, for example if my global prefix is |
I can't seem to reproduce the global prefix not being applied. Do you have an example showing that? There's no easy way to change the prefix no, I'm not aware of a way to ignore the global prefix in NestJS. Something that could be done would be to create your own admin module (https://nestjs-admin.com/docs/custom-admin-module) independent from the rest of your app, where you'd have all the |
I think the problem here isnt the prefix, you can hit the route, but when you send an XHR, it should check if app has global prefix and attach it to the request url |
Current behavior is that it tries the req, it cuts your prefix from the route since it didnt hit it and then you end up on a not found page |
Have the same issue. I'm using 'api' global prefix for my |
Just do not use the global prefix. You have to manually add it on your
@controller decorators
…On Fri, Jun 5, 2020, 10:02 maksimoancha ***@***.***> wrote:
Current behavior is that it tries the req, it cuts your prefix from the
route since it didnt hit it and then you end up on a not found page
Have the same issue. I'm using *'api'* global prefix for my app, and can
open login page at *.../api/admin/login*, but when click button to login,
got "*Not Found*" error because request with my login info sended to
*../admin/login* indtead of *.../api/admin/login*. Do you found any
solution?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#159 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACX65JVGAISY2GDC3SIZSHTRVCRCNANCNFSM4LRFCUCA>
.
|
Is it possible to configure app prefix or use it out-of-the-box when setting up
app.setGlobalPrefix
?The text was updated successfully, but these errors were encountered: