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

Add Cloud support for AvMessage #277

Open
thutto opened this issue Jul 24, 2020 · 0 comments
Open

Add Cloud support for AvMessage #277

thutto opened this issue Jul 24, 2020 · 0 comments
Assignees

Comments

@thutto
Copy link

thutto commented Jul 24, 2020

🚀 Feature request

Current Behavior

AvMessage grabs window.location.origin if available. This causes a cross domain error with cloud applications.

Desired Behavior

For Cloud Applications utilize the referrer if available.

Suggested Solution

Create a method in env-var to determine of we are a cloud app.
export function isCloud(windowOverride = window) { const options = getLocationComponents(windowOverride); return !!getCloudEnv(options); }

Modify the domain function of AvMessage to use referrer if we are cloud.
if (document.referrer && isCloud()) { const referrerAnchor = getLocation(document.referrer); return ${referrerAnchor.protocol}//${referrerAnchor.host}; }

Who does this impact? Who is this for?

This is for the Spaces Cloud Effort for the Digital Team.

For MySelf

Describe alternatives you've considered

Additional context

@thutto thutto self-assigned this Jul 24, 2020
@thutto thutto changed the title Add isCloud function to env-var. Add Cloud support for AvMessage Jul 24, 2020
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