How can I prevent users from directly accessing my web application on Cloudfoundry?
For example: I deployed a spring application on Cloudfoundry, that can be accessed using url myapp.cloudfoundry.com (this is just an example).
Then, I use another web app, deployed on Google App Engine, that acts like a reverse proxy for the one deployed on cloudfoundry ( like in this example http://programming.mvergel.com/2011/11/cloud-foundry-and-custom-domain.html ), that can be accessed by users, using lets say myapp.appspot.com
Now, my question is: is there an elegant way of preventing users from accessing my app using the link myapp.cloudfoundry.com and allow them to just use myapp.appspot.com ? I am thinking of adding some sort of token in the request headers when redirecting from appspot to cloudfoundry, but I don't think this is the best solution.
Can some one give me a hint about this one ?