From afa561b297f2b1b065e000f8ad5b4e523ee4265d Mon Sep 17 00:00:00 2001 From: Labinator <38120162+LabinatorSolutions@users.noreply.github.com> Date: Tue, 28 May 2024 10:45:10 +0800 Subject: [PATCH] Update README.md Signed-off-by: Labinator <38120162+LabinatorSolutions@users.noreply.github.com> --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bcbd147..4636d5b 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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/) \ No newline at end of file +- [Labinator](https://labinator.com/)