Skip to content

core: frontend: kraken: StoreExtensionCard: Fix cross problem#3395

Closed
patrickelectric wants to merge 1 commit into
bluerobotics:masterfrom
patrickelectric:fix-cors
Closed

core: frontend: kraken: StoreExtensionCard: Fix cross problem#3395
patrickelectric wants to merge 1 commit into
bluerobotics:masterfrom
patrickelectric:fix-cors

Conversation

@patrickelectric

@patrickelectric patrickelectric commented Jun 21, 2025

Copy link
Copy Markdown
Member

Summary by Sourcery

Bug Fixes:

  • Prefix extension logo URLs with corsproxy.io to bypass cross-origin restrictions.

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
@sourcery-ai

sourcery-ai Bot commented Jun 21, 2025

Copy link
Copy Markdown

Reviewer's Guide

Modifies StoreExtensionCard.vue to prepend a CORS proxy URL to the extension_logo src, resolving cross-domain image loading issues.

File-Level Changes

Change Details Files
Prepend CORS proxy to extension_logo URL core/frontend/src/components/kraken/cards/StoreExtensionCard.vue

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @patrickelectric - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `core/frontend/src/components/kraken/cards/StoreExtensionCard.vue:53` </location>
<code_context>
             ref="extension_logo"
             contain
-            :src="extension.extension_logo"
+            :src="'https://corsproxy.io/?url=' + extension.extension_logo"
             height="150px"
             class="mt-3 mb-5 my-2 logo-img"
</code_context>

<issue_to_address>
Using a public CORS proxy for image loading introduces reliability and security concerns.

Third-party proxies like corsproxy.io may be unreliable and pose security risks. It's better to manage CORS on your backend or use a proxy you control.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

ref="extension_logo"
contain
:src="extension.extension_logo"
:src="'https://corsproxy.io/?url=' + extension.extension_logo"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 issue (security): Using a public CORS proxy for image loading introduces reliability and security concerns.

Third-party proxies like corsproxy.io may be unreliable and pose security risks. It's better to manage CORS on your backend or use a proxy you control.

@joaoantoniocardoso joaoantoniocardoso left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be aware that if we are using it on the free tier (which is meant for development), they say:

  • it has a rate limit of 60 per minute (per IP), which means this will be a temporary fix.
  • it is limited to localhost, which means it might not work on our BlueOS live preview.

@patrickelectric

Copy link
Copy Markdown
Member Author

Be aware that if we are using it on the free tier (which is meant for development), they say:

  • it has a rate limit of 60 per minute (per IP), which means this will be a temporary fix.
  • it is limited to localhost, which means it might not work on our BlueOS live preview.

Oh sad..

@patrickelectric

Copy link
Copy Markdown
Member Author

We may need to upload our stuff to Amazon or start having our own git mirror

@joaomariolago

Copy link
Copy Markdown
Collaborator

This probably will work as a temporary fix as @joaoantoniocardoso mentioned, the code seems to work ok, but I also agree that maybe uploading to other place will be better.

@Williangalvani

Copy link
Copy Markdown
Member

was this fixed by bluerobotics/BlueOS-Extensions-Repository#147?

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

Successfully merging this pull request may close these issues.

4 participants