Skip to content
Discussion options

You must be logged in to vote

According to the docs, enabling serverProxy should cause the browser to call the frontend domain, while Nuxt internally forwards the request to the Laravel backend.

Hey @derrickobedgiu1 , this is correct. Here is the example of complete configuration to handle all requests internally:

export default defineNuxtConfig({
  modules: [
    // ...
    'nuxt-auth-sanctum',
  ],

  ssr: true,

  sanctum: {
    baseUrl: '/laravel',
    serverProxy: {
      enabled: true,
      baseUrl: 'http://localhost:80',
      route: '/laravel',
    },
  },
})

All requests will be sent to http://localhost:3000/laravel/* which will be redirected to http://localhost:80/*.

However, this does not appear to be w…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@derrickobedgiu1
Comment options

@manchenkoff
Comment options

Answer selected by manchenkoff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants