Closed keedle closed 4 years ago
Hello, @keedle.
All requests without /api
prefix are proxied to the nuxt instance, that's why you can't hit sanctum endpoint.
By default, sanctum package uses /sanctum
prefix as default.
You need to replace that prefix it in the api/config/sanctum.php
like this:
'prefix' => 'api/sanctum'
Thanks.
Note, that you need to prefix all your Laravel routes with api
to make them available from the nuxt app, not only sanctum's.
Thank you for help, kinda missed prefix bit in sanctum's docs. Thank you for such a great docker build.
Hello
How to fix this issue ? I can't fix -> http://localhost:3000/sanctum/csrf-cookie 404 (Not Found)
createError.js:16 Uncaught (in promise) Error: Request failed with status code 404
at createError (createError.js:16:1)
at settle (settle.js:17:1)
at XMLHttpRequest.onloadend (xhr.js:66:1)
Same problem here
same problem here
same problem, when i use prefix my application routes middleware not working
Hello, When I try to make get request in postman to localhost:8080/api/sanctum/csrf-cookie I'm always getting 404 not found, however, if I change the port to 8081 and remove/api bit it works and gives me 204. Any ideas why that happens ? Thank you.