问题
Right now I have an application on my website that users can easily download from my website, is there a way to hide or make it really hard to be able to find my application, so people can't just add /files/App.exe into the end of my domain to get my app? What do you recommend?
回答1:
Hiding your exe could be accomplished by
- Create a unique identifier (perhaps a GUID)
- Associate this with a file name for download and an expiration date (in a DB, perhaps)
- Create a page that takes the unique ID as a parameter
- Have this page check the DB for the unique id and ensure it hasn't passed the expiration date
- Send the file to the client, setting Content-Disposition header to attachment
If you are using ASP.NET this example will help you
回答2:
If u are using asp.net create a httphandler and map it in your web.config to the path of app.exe.. and just do response.write("get out") and log the details of the request.....equivalents are available on all popular platforms...
来源:https://stackoverflow.com/questions/32389533/hiding-my-app-on-my-website