+ Start a Discussion
SeAlVaSeAlVa 

Avoid redirect to c.xxx.visual.force.com/apex ... While accessing VF

Hello, 

 

I am trying to do a $.get() method (jquery) to retrieve the source code of a visualforce.

 

If I use the code while I'm in the domain c.xxx.visual.force.com/apex/myVF it works fine.

BUT If I use the code while I'm in a standard page (domain xxx.salesforce.com ) I get a redirect message and my code fails.

 

What leads me to the following questions.

- Is there any way to load a visualforce avoiding the redirect to the domain c.xxx.visual.force.com ?

- or... Is there any way to send session information to let it load properly?

 

Regards.

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox

1} No.

2) This is an XSS issue. You'll need to use SOA proxy to reach the VF domain; this design was intentional to prevent rogue XSS attacks in Visualforce from reaching the instance server and doing unjust harm.

All Answers

sfdcfoxsfdcfox

1} No.

2) This is an XSS issue. You'll need to use SOA proxy to reach the VF domain; this design was intentional to prevent rogue XSS attacks in Visualforce from reaching the instance server and doing unjust harm.

This was selected as the best answer
SeAlVaSeAlVa

Not the answer I was expecting, but is an answer. I'll mark it as solution.

 

Thanks