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

[BUG] Can't include Correlation Header on IE can fail #1260

Closed
MSNev opened this issue May 1, 2020 · 3 comments · Fixed by #1266
Closed

[BUG] Can't include Correlation Header on IE can fail #1260

MSNev opened this issue May 1, 2020 · 3 comments · Fixed by #1266
Assignees
Labels
Milestone

Comments

@MSNev
Copy link
Collaborator

MSNev commented May 1, 2020

The following function in Utils.ts
const requestHost = UrlHelper.parseUrl(requestUrl).host.toLowerCase();

On IE can return the port number with the host rather than just the host.

Note: This may not be a significant issue or it only affects situations where the ajax request is using a different protocol (http/https/port) than the main hosting page -- investigating.

@MSNev MSNev self-assigned this May 1, 2020
@MSNev MSNev added the investigating Investigating the issue label May 1, 2020
@MSNev
Copy link
Collaborator Author

MSNev commented May 5, 2020

On investigating the criteria that is used when the SDK adds this value to the ajax request it appears that there has been a change in IE (as the SDK code around this has not change in over 8 months) where when an ajax request is created it checks that the ajax request is being sent to the same host and if not it does not include -- this IS what is happening here.

On doing some basic investigation using https protocol what is occurring is that (for example) when the host is "https://mydomain.com" and an ajax request is sent to "https://mydomain.com/api" when we query the URL for the ajax "host" IE returns "mydomain.com:443" and for the page it returns "mydomain.com" -- which don't match (as we support and verify different ports).

As a workaround for this issue you should be able to add the "correlationHeaderDomains" config to the Application Insights config (same place as the Instrumentation key)

So for a site hosted on "mydomain.com" using https should add something like the following.

aiConfig = {
instrumentationKey: "INSTRUMENTATION_KEY",
correlationHeaderDomains: "mydomain.com:443"
}

@MSNev MSNev added bug and removed investigating Investigating the issue labels May 6, 2020
MSNev pushed a commit that referenced this issue May 13, 2020
[BUG] ajax.ts is using string trim() which is not supported on IE7/8 #1251
@MSNev MSNev changed the title [BUG] Can include Correlation Header on IE can fail [BUG] Can't include Correlation Header on IE can fail May 13, 2020
MSNev added a commit that referenced this issue May 20, 2020
[BUG] ajax.ts is using string trim() which is not supported on IE7/8 #1251
@MSNev MSNev added the fixed - waiting release PR Committed and waiting deployment label May 21, 2020
@MSNev MSNev added this to the 2.5.5 milestone Jun 2, 2020
@MSNev MSNev linked a pull request Jun 2, 2020 that will close this issue
@MSNev MSNev removed the fixed - waiting release PR Committed and waiting deployment label Jun 4, 2020
@MSNev
Copy link
Collaborator Author

MSNev commented Jun 4, 2020

Included in v 2.5.5 which is now fully deployed

@MSNev MSNev closed this as completed Jun 4, 2020
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant