A simple example app that runs on Cloud Foundry serving a protected JSON file using the Staticfile Buildpack. In addition this example shows how to set CORS and HSTS headers to get this data from any app forcing HTTPS.
Usage: cf push protected
Once the app is running, simply GET the /data.json content.
User: Hello
Password: World!
More Details about the Staticfile Buildpack
Please Note: This is an example app with a unsecure password that you would not have in git without gitcrypt for productive use cases.