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

Issue with image URLs in styles that are added to a page #268

Open
sanex3339 opened this issue Jun 3, 2024 · 0 comments
Open

Issue with image URLs in styles that are added to a page #268

sanex3339 opened this issue Jun 3, 2024 · 0 comments

Comments

@sanex3339
Copy link

sanex3339 commented Jun 3, 2024

Hello, we found a global issue with wrong image paths.
This issue happens even when the extension is installed, but is not enabled because of missing integration for a website:

So the root issue:

  • the extension adds styles to a page even if an integration for a website is missing
  • when styles are added, we can see that for each image there are 2 places where its path is defined:
    • in these added styles, and the issue there is that an image path is relative to the website domain, so, for example, the path looks like https://example.com/assets/images/arrow-light-mode.png. Such paths don't work!
    • also as inline styles, the path there is correct and references the extension path and this variant works

What does it cause?:

  • we use LogRocket to capture sessions for users
  • LogRocket has an internal bot that parses the content of a page, extracts asset URL's from it, and tries to pre-cache them
  • because this extension always pre-adds styles to a page, the LogRocket bot finds them and tries to fetch these resources, of course, it can't do it, so the bot gets a 404 error and on our side, we're getting the 404 error in our logs.

So what can be done on the extension side?

  • don't add styles to a page when the extension does not work on a web site, i.e. the integration for a website is missing
  • fix image URL's in added styles or remove them at all, because anyway URL's from inline styles are used.
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