CORS Usage in Controller |
Hi,
I was working on security of API. Did anyone let me know how we can apply CORS in elegant way? Or what you recommend for Security of API to not expose to outer world?
.NET and CodeIgniter Software Engineer
I do it like this for fonts for security you may need to do it different.
Code: # Add Font Types You can read all about it from the link below. Cross-Origin Resource Sharing (CORS) What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(04-12-2019, 03:19 PM)InsiteFX Wrote: I do it like this for fonts for security you may need to do it different. what if I want to allow one controller to only abc.com and other controller to xyz.com?
.NET and CodeIgniter Software Engineer
Access-Control-Allow-Origin: http://your.com/controller1
Access-Control-Allow-Origin: http://your.com/controller2 Change your.com to your site and controller# to your controllers. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |