Is there any way to differentiate and route the requests that comes from the browser and from the command line?
Eg: My LoadServer(running on the port 80) will get two kinds of requests from the browser and from the command line and in the backend, two more RequestServers are running on port 8081 and 8082. if a command line request is received to my LoadServer:80 it should redirect to RequestServer:8081 and if the browser request then RequestServer:8082.
Perhaps on the user agent, but this is very old school…
In my opinion, if you have different servers with different purposes, make them available separately, such that each consumer can connect its own dedicated server.
What Kind of additional Information I’m seeing the same information only the User Agent is changing that too for Command line is showing CURL/…/… if you are saying the same can you tell me the generic method of differentiating all kinds of browsers with different versions and Command Line(CURL) versions
As a user I’d be confused if curl gave me different results than what I see in my browser…
Also, some headless scripting of chrome or firefox, do you consider that “from the terminal”? What is about lynx, links or brow.sh? How would you treat those? Someone trying to scrape your page using a programming language, is that “from the terminal” or “from a browser”?
The simplest thing for you and your users, is to simply make different resources available under different URLs.
In detail I’m running a Git Server(Golang) and Repository Viewing Server(Java). My application chould exactly run like https://android.googlesource.com/.
Actually it will be very easy if both are in same language but i developed in golang and the Gitiles is in Java.So I planned to run one more in different port which routes requests.