Reputation: 135
I am building a REST API with sails js and I want to allow only a specific white list of hosts to request it. I know that this can be configured in CORS config file for Browser to Server requests. But in my case, I need it for Server to Server requests. Thanks
Upvotes: 2
Views: 82
Reputation: 2051
CORS of course can't restrict server-server request because it's applied to browser. You must specify it in controller, maybe some kind like using special key request
or any kind of authentication that only some requester with some secret key are allowed to access.
Upvotes: 1