1

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.
Alvin
  • 7,167
  • 18
  • 72
  • 152

2 Answers2

1

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

Kenichi Shibata
  • 148
  • 1
  • 11
0

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.

Community
  • 1
  • 1
Amit
  • 53
  • 7