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
Post a Comment