html - Encrypting src attribute of iframe control -
this question has answer here:
- what practice approach hide private url? 2 answers
i using iframe load pdf file temporary location , looks shown below
<iframe id="mypdf" width="100%" height="100%" src="config\temp\tmp_report_0.pdf"></iframe>
this load pdf file browser window, inside iframe. question how can hide 'src' value being visible user when right click , select 'view source' browser.
the intention here enrcypt/hide 'src' value users. suggestions?
you can use generic handler hide file location.
inside handler serve file base on url parameter. here basic example:
<iframe id="mypdf" width="100%" height="100%" src="openreport.ashx?reportid=2129938212"></iframe>
now can/must encrypt url parameter avoid download reports.
an example of handler download file : asp.net file download server
from remove line contains attachment; filename=
file load on inside of iframe. of course can find many other examples.
Comments
Post a Comment