DEV Community

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

Collapse
 
romanpaprotsky profile image
Roman Paprotsky • Edited

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