DEV Community

Discussion on: Building Vue.js Client SPA Token-Based Authentication with Laravel Sanctum

Collapse
romanpaprotsky profile image
Roman Paprotsky Author • Edited on

Great question!

To make the api accessible from your site only, you have to set

 'allowed_origins' => ['http://yoursitename.com']

Screenshot

Access-Control-Allow-Origin