This is a great tutorial! But I have a tiny question. While setting CORs as I understand we made the api accessible from everywhere? I want my api to work only within my website, how to achieve that?
To make the api accessible from your site only, you have to set
'allowed_origins' => ['http://yoursitename.com']
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.