1

I'm using cornerstone which sends a request to a reverse proxy that redirect the request to the an orthanc server for CORS blocks, and all of this using http because I can't use https

I see this question related with the same problem which solution is to change to https. Do I have to switch to https to use "SharedArrayBuffer" in Chrome 92?

here https://developer.chrome.com/blog/enabling-shared-array-buffer/ tolds that I can do this in the webpack.config.js

devServer: {
hot: true,
open: false,
port: 3333,
historyApiFallback: true,
allowedHosts:"all",
headers: {

 "Access-Control-Allow-Origin": "*",
 "Cross-Origin-Embedder-Policy": "require-corp",
 "Cross-Origin-Opener-Policy": "same-origin",

}

But the result is both

The Cross-Origin-Opener-Policy header has been ignored, because the URL's origin was untrustworthy. It was defined either in the final response or a redirect. Please deliver the response using the HTTPS protocol. You can also use the 'localhost' origin instead. See https://www.w3.org/TR/powerful-features/#potentially-trustworthy-origin and https://html.spec.whatwg.org/#the-cross-origin-opener-policy-header.

And

createFloat32SharedArray.ts:35 Uncaught (in promise) Error: SharedArrayBuffer is NOT supported in your browser see https://developer.chrome.com/blog/enabling-shared-array-buffer/

So i have to delete "Cross-Origin-Embedder-Policy": "require-corp", "Cross-Origin-Opener-Policy": "same-origin",

And add "Cross-Origin-Embedder-Policy": " none" in order to avoid de CORS, but still getting the sharedBuffedArray error.

I also try enable the Experimental JavaScript shared memory features flag in my chrome browser but I'm still getting the sharedBufferedArray error

Experimental JavaScript shared memory features Enable web pages to use non-standard, experimental JavaScript shared memory features. Their use requires the same HTTP headers required by cross-thread usage of SharedArrayBuffers (i.e. COOP and COEP). – Mac, Windows, Linux, ChromeOS, Android, Fuchsia, Lacros

#enable-javascript-experimental-shared-memory

And finally I tried an older version of google chrome but then I get StructureClone error because is not yet implemented in those versions.

Is there a way to solve this problem while using http?

3
  • Were you able to find a solution? Commented Jun 14, 2024 at 20:18
  • 1
    no, I was forced to use https. Or you can use certain versions of google chrome where is still enable. Commented Jun 20, 2024 at 13:52
  • ok. In my case I used the "setupMiddlewares" key in module.exports. And then I used the "http-proxy-middleware" package to set the same-origin-policy. Commented Jul 17, 2024 at 12:18

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.