Skip to content

Commit 8b1d870

Browse files
author
Florens Verschelde
committed
doc(browsers): Add page with instructions for Brave Shields
1 parent 6313669 commit 8b1d870

File tree

6 files changed

+30
-3
lines changed

6 files changed

+30
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
This repository serves as a coordination point for the WebContainer working group. Chat with our team live on [Discord](https://discord.gg/stackblitz). See how you can [get involved](#getting-involved) below.
44

5-
### Browser Support
5+
## Browser Support
66

7-
|<a href="#">![](https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png)</a><br>Chrome|<a href="#">![](https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png)</a><br>Edge|<a href="#">![](https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png)</a><br>Opera|<a href="#">![](https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png)</a><br>Safari|<a href="#">![](https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png)</a><br>Firefox|
7+
|![](https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png)<br>Chrome|![](https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png)<br>Edge|![](https://raw.githubusercontent.com/alrra/browser-logos/master/src/brave/brave_48x48.png)<br>Brave|![](https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png)<br>Safari|![](https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png)<br>Firefox|
88
|:---:|:---:|:---:|:---:|:---:|
9-
|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:soon:|:soon:|
9+
|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:<br>[Config needed](browsers/brave/brave.md)|:soon:|:soon:|
1010

1111
## Explainer
1212

browsers/brave/1-stuck-project.png

60.6 KB
Loading

browsers/brave/2-shields-popup.png

23.9 KB
Loading
95.3 KB
Loading
105 KB
Loading

browsers/brave/brave.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Running WebContainer in Brave Browser
2+
3+
WebContainer — the technology behind Node.js projects on StackBlitz — does work in Brave. However, it requires a small configuration change.
4+
5+
## What’s the problem?
6+
7+
By default, Brave’s “Shields” feature blocks [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) and cookies from third-party domains.
8+
9+
When you visit a WebContainer-enabled project on [stackblitz.com](https://www.stackblitz.com/), StackBlitz tries to register a Service Worker for the domain `<project_name>.stackblitz.io`. Since it’s considered a third-party domain, Brave will reject it.
10+
11+
## How to allow third-party service workers for stackblitz.com
12+
13+
1. Visit a WebContainer-based project, for instance https://www.stackblitz.com/edit/nextjs. The project’s boot sequence might stay stuck on the “Running start command” step:
14+
15+
<img src="1-stuck-project.png" width="784" alt="Screenshot of Brave on a WebContainer project with the Brave Shields feature on. Loading the project’s web server is stuck on the last step.">
16+
17+
2. Click on the “Shields” icon at the right of the address bar, then click on “Advanced View”.
18+
19+
<img src="2-shields-popup.png" width="380" alt="Screenshot showing the Shields configuration popup for stackblitz.com.">
20+
21+
3. In the advanced view, change the “Cross-site cookies blocked” option to “All cookies allowed”.
22+
23+
<img src="3-shields-details.png" width="760" alt="Screenshot showing the advanced view of the Shields configuration popup, with a drop-down selector for cross-site cookie permissions.">
24+
25+
Brave will reload the page, and you should get a working project:
26+
27+
<img src="4-working-project.png" width="784" alt="Screenshot of Brave on a WebContainer project with the Brave Shields feature tweaked to allow third-party cookies and Service Workers. Loading the web server works, and shows the default page for Next.js’s starter project.">

0 commit comments

Comments
 (0)