Skip to content

BUG: "Open in StackBlitz” button broken by CORS #226

@coder0107git

Description

@coder0107git

Describe the bug
When the "Open in StackBlitz" button is requested with CORS (i.e. <img crossorigin="anonymous" ...>), it isn't loaded.

To Reproduce
Steps to reproduce the behavior:

  1. Run the following HTML
<!-- Broken badge -->
<img alt="Open in StackBlitz" 
     crossorigin="anonymous" 
     src="https://developer.stackblitz.com/img/open_in_stackblitz_small.svg">

<!-- Working badge-->
<img alt="Open in StackBlitz"  
     src="https://developer.stackblitz.com/img/open_in_stackblitz_small.svg">
  1. Open the DevTools Console tab
  2. See error

Expected behavior
For the image to load.

Screenshots
An "Open in StackBlitz" image not loading and one loading
Chrome DevTool error message saying "Access to image at 'https://developer.stackblitz.com/img/open_in_stackblitz_small.svg' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."

Desktop:

  • OS: Windows
  • Browser: Chrome
  • Version: 126

Additional context

Metadata

Metadata

Assignees

Labels

triagenew issues that need to be assigned

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions