Denying direct access to a folder (only allow through app)

前端 未结 4 686
清歌不尽
清歌不尽 2020-12-15 14:32

I need to prevent someone from directly accessing a pdf, instead only allowing them to be pulled through the app itself. How can this be done?

4条回答
  •  隐瞒了意图╮
    2020-12-15 15:06

    Put the files in the app_data folder and then use a HttpHandler to serve the files. You can use url rewriting if you want to hide it and make it look cleaner.

提交回复
热议问题