© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Osinachi Chukwujama
Web developer + Technical Writer
Nice article man. I have one question.
What if I'm building a payment service like Paystack and I need to allow a different users access my API? How can I enforce CORS in such a case?
Vic okeke
Your favourite software developer
Yeah, you can request for their domains while they sign-up for your API, then store in a database, you then fetch all domains into an array/list is an accepted format in the cors origin option
Amolo
Software Developer
Additionally, such APIs don't restrict which "origin" calls them. You probably want to pass the JWT as a header or something in that line.