Laravel Nova, Vue.js, & Axios Common Config Options?

Posted 4 months ago by kennonb

I have hopefully a quick question. Looking for a best practice. I'm using Nova and I have an API (using Passport) that I want to Authenticate with, but I need to add axios.defaults.withCredentials = true; to all API requests. This seems to be because I'm on different sub-domains (api.* & admin.*). Where is the best place to put this in Nova? Or should I append it in a custom tool?

Trying to make use of the CreateFreshApiToken Middleware btw, so I don't have to re-authenticate or store/transmit an oauth token during login.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.