Is there any way to privatize the content of an iframe?

0

I'm working with ArcGIS , creating a map viewer. You can apparently include that viewer in your page. web, which is what I want (a web application). The problem with which I am finding is that the method to insert it in my html document is by a <iframe> . The src contains a url address that, who knows how to use the browser inspector, you can easily obtain and so you would not need to use my application. I would have that url and could access directly by copying and pasting it in the search engine. (Attachment code):

 <iframe id="visor" src="http://estoEsLaURLdelVisor"></iframe>

I would like you to not be able to get that url, I do not know if there is any way to privatize the content of the iframe , or, if someone knows about ArcGIS , what could you give me? some solution so that this viewer that I generate, is not "so open to the public" .

Thank you very much.

(I add the PHP tag, because I'm working with a user control with that language)

    
asked by Pelayo 07.02.2018 в 09:20
source

1 answer

0

1.- In javascript, on the main page, place the following function:

function SetSrc (x) {     var iframe = document.getElementById ('viewer');
    iframe.src = x; }

2 .- And in the html part:

< iframe id="viewer" src="x.html" > < / iframe >

3.- Then, in another file called x.html place in the head:

< script type="text / javascript" >         parent.SetSrc (" link ....."); < / script >

4.- Obfuscate the code of the page x.html with a code obfuscator, I do not know if it is allowed to publish names but it is a good one.

When loading x.html, call the SetSrc function of the main page, giving a parameter that is the URL to change the content of the iframe but without changing the source code of the main page and how the code of x.html would be obfuscated. It would be very difficult to see the URL parameter.

    
answered by 29.07.2018 в 23:58