2

Im running a Cloudfoundry app without any troubles. However, subfolders and their files are exposed and accessible simply by adding it to the URL -> for example /lang/fr.json.

Is there any way to prevent direct access to such subfolders for Cloudfundry apps? On a regular Apache server, I'd activate mod_rewrite to automatically route back to the index file of my app.

Thanks!

Stefan
  • 31
  • 3
  • 2
    This is dependent on what buildpack you use. Can you give a bit mor details on what your app actually is and what buildpack you're using? – Lafunamor Jan 19 '18 at 16:32

1 Answers1

1

I found the solution: I'm using the standard Cloud Foundry buildpack for PHP. In the options.json file, I pass the parameter "HTTPD_VERSION":"2.4".

With Apache 2.4 installed, I can simply place a .htaccess file in the folder I want to protect. The file only needs the content Require all denied.

Stefan
  • 31
  • 3