1

Is there like any method to only allow direct access to my website only from the Android application.

Any other requests coming from any where else being blocked or redirected to a restricted access page or similar.

Please do provide any ideas or simple solutions and any step by step procedure to do so would be greatly appreciated.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Arren
  • 33
  • 1
  • 11

1 Answers1

3

a little idea here:

Make all your request to index HTML and then redirect according to user agent

On index validate the request headers seeking for user agent and if it's not android then redirect to another site.

Info about user-agent at mozilla site: here

Edit: As MrWhite says, make sure that Android app sends a unique user-agent.

Kevin
  • 93
  • 6
  • 2
    "user agent and if it's not android" - Make sure the Android _application_ is sending a unique user-agent header. Or even set a specific header that is then checked. – MrWhite Mar 25 '21 at 18:03
  • @Kevin@MrWhite Thanks I'll check it verify the user agents then. Since I use webview from android I'll just check for chrome then and I'll just add a token in header if possible. – Arren Mar 26 '21 at 17:53