Denying download of specific files in ASP.NET MVC -


i have couple of files sitting in root of project web files, not: package.json , gruntfile.js example.

unfortunately, user can navigate files in root path.

i'd avoid this. there must way? of other files in folder aren't accessable.

the simplest way, be: create 2 routes, /package.json , /gruntfile.js controller respond http 403.

another, create global filter, match routes , respond http 403 well.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -