Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API request don't work when VF page is displayed in lightning #32

Open
ChuckJonas opened this issue Jul 8, 2020 · 0 comments
Open

API request don't work when VF page is displayed in lightning #32

ChuckJonas opened this issue Jul 8, 2020 · 0 comments

Comments

@ChuckJonas
Copy link
Owner

ChuckJonas commented Jul 8, 2020

When the VF page is loaded into lightning, the request stop working because the app is using ?isdtp=p1 gets to the instance url __RESTHOST__.

Fix: update the header to remove extra junk:

const __RESTHOST__ = '{!URLFOR("/", null)}'.replace("?isdtp=p1", "");

Might want to come up with a more robust solution as there might be other URL param/values that get appended

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant