yandeu / five-server-vscode

⚡ VSCode Extension for Five Server.
https://marketplace.visualstudio.com/items?itemName=yandeu.five-server
Other
121 stars 9 forks source link

is blocking CDN requests #10

Closed Gaarmy closed 2 years ago

Gaarmy commented 2 years ago

Recently in my projects the console marks these problems that are the requests of CDNs

Before I did not have the CORS activated, nor the middleware, but now it does not work in any way

Screenshot 2021-11-24 160513

Anyway thanks for the plugin it's very good

yandeu commented 2 years ago

Anyway thanks for the plugin it's very good

Thanks!

Try:

const customHeaders = (req, res, next) => {
  res.setHeader('Cross-Origin-Embedder-Policy', 'unsafe-none')
  res.setHeader('Cross-Origin-Opener-Policy', 'unsafe-none')
  res.setHeader('Cross-Origin-Resource-Policy', 'cross-origin')
  next()
}
yandeu commented 2 years ago

I just uploaded a new version of five-server (v0.1.1), please test if it work without any customHeaders.

Gaarmy commented 2 years ago

I just uploaded a new version of five-server (v0.1.1), please test if it work without any customHeaders.

Yeah, is working

Thanks!