Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Signed-off-by: Labinator <[email protected]>
  • Loading branch information
LabinatorSolutions authored May 28, 2024
1 parent 0895b28 commit afa561b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,21 @@ Our mission is to develop a modern, responsive, free, and open-source web-based

---

## HTTP Headers Setup

The app is currently using **Stockfish NNUE 16 JS**, which utilizes the `SharedArrayBuffer`. To ensure the engine functions correctly, you need to enable SharedArrayBuffer support both locally and on your server. This involves setting appropriate HTTP headers.

To enable `SharedArrayBuffer`, you must configure the following HTTP headers:

1. **Cross-Origin-Opener-Policy (COOP)**: This should be set to `same-origin`.
2. **Cross-Origin-Embedder-Policy (COEP)**: This should be set to `require-corp`.

These headers isolate the context of your page and provide the necessary security guarantees for using `SharedArrayBuffer`. Properly configuring these headers will allow the Stockfish NNUE 16 JS engine to operate efficiently. Alternatively, you can switch to the **Stockfish NNUE 16 Single JS** which does not utilize the `SharedArrayBuffer`.

Read more about `ShreadArrayBuffer` at [this link](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer).

---

## Server and Deployment

The application is designed for easy deployment in any standard Node.js environment.
Expand Down Expand Up @@ -130,4 +145,4 @@ This project is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE (AGPLv3). F
- [TensorFlow](https://github.com/tensorflow/tensorflow)
- [PeshkaChess](https://github.com/hxim/PeshkaChess)
- [BoldChess](https://boldchess.com/)
- [Labinator](https://labinator.com/)
- [Labinator](https://labinator.com/)

0 comments on commit afa561b

Please sign in to comment.