Reputation: 8499
By using Node and Express, can I allow only HTTP REST calling from a specific mobile app?
For security reason, I want to achieve these:
1. Allow only specific IP range. Since both of the app is hosted using Azure website.
2. Allow only connection from specific mobile app.
Upvotes: 1
Views: 241
Reputation: 53
You can check HTTP Headers to get the client ips, see here Check the ip with your IP list and only return if it is success.
Upvotes: 0
Reputation: 158
Use CORS or JSONP
In CORS
For example, to allow http://mozilla.com to access the resource, you can specify:
Access-Control-Allow-Origin: http://mozilla.com
Upvotes: 1