Sie sind nicht angemeldet.

Luis Erantzcani

Fortgeschrittener

  • »Luis Erantzcani« ist der Autor dieses Themas

Beiträge: 249

Wohnort: Mexico City

Beruf: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer

  • Nachricht senden

1

Freitag, 11. November 2022, 23:15

[Solved] Using different URLs for Skin / Tour, how to??

Hello Klaus and community,

I'm implementing a new structure for my krpano tours and need some help! This is the new way I'm structuring tours on my site :

SKIN URL https://mydomain.com/skin/ (Skin folder: krpano .js/.swf files and xml's)
TOUR URL https://client.mydomain.com/ (Subdomain linked to a folder with tour files: tour.xml / panorama tiles)


This allows to use an A record to mirror tour.domain.com into client's website subdomain (360.clientdomain.com) and also have a global skin which can be easily updated for all my tours.

I already set the embedding code at https://tour.mydomain.com/index.html to link files from https://mydomain.com/skin/ with the basic embedpano functionality as:

<body>
<script src="https://mydomain.com/skin/skin/tour.js"></script>
<div id="pano" style="width:100%;height:100%;">
<noscript><table style="width:100%;height:100%;"><tr style="vertical-align:middle;"><td><div style="text-align:center;">ERROR:<br/><br/>Javascript not activated<br/><br/></div></td></tr></table></noscript>
<script>embedpano({swf:"https://mydomain.com/skin/skin/tour.swf", xml:"tour.xml", target:"pano", html5:"always", mobilescale:1.0, passQueryParameters:true, bgcolor:"#000000"});</script>
</div>
</body>


This method loads the krpano SWF/JS files but doesn't get to load skin.xml as I get the following message:

FATAL ERROR:
https://mydomain.com/skin/skin.xml - loading failed! (0)


This skin.xml file is called internally from tour.xml by an include element (<include url="%VIEWER%/skin.xml"/>). As tour.js path already was declared I'd expect it to load (it does load directly at URL https://mydomain.com/skin/skin.xml) so I'm confused here.

I tried different placeholders:

<include url="%VIEWER%/skin.xml"/>
<include url="%SWFPATH%/skin.xml"/>
<include url="%ROOT%/skin.xml"/>


None of them is working. So have you had this kind of integration before, Klaus, what do you think could be done here?

Best

Luis *thumbup*

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Luis Erantzcani« (12. November 2022, 00:35)


2

Freitag, 11. November 2022, 23:45

Google: krpano XSS

Luis Erantzcani

Fortgeschrittener

  • »Luis Erantzcani« ist der Autor dieses Themas

Beiträge: 249

Wohnort: Mexico City

Beruf: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer

  • Nachricht senden

3

Samstag, 12. November 2022, 00:03

Thank you s-maier! didn't know that vulnerability, will do a double check on my tours. *thumbsup*

Now, I'm seeing this is a whole CORS policy issue, just digging on forum posts.

Luis Erantzcani

Fortgeschrittener

  • »Luis Erantzcani« ist der Autor dieses Themas

Beiträge: 249

Wohnort: Mexico City

Beruf: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer

  • Nachricht senden

4

Samstag, 12. November 2022, 00:38

Just solved this issue with a Klaus advice on another post. Added the following line to the .htaccess at root folder of /skin:

Header set Access-Control-Allow-Origin "*"

As I've read this may vary depending on the server type, but in my case it worked right away. I leave here the info in case is useful for someone else.

Best

Luis *thumbup*