Git Product home page Git Product logo

Comments (8)

mcollina avatar mcollina commented on June 28, 2024 1

Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.

from fastify-cors.

climba03003 avatar climba03003 commented on June 28, 2024 1

I would treats it the same as fastify/fastify-cookie#261

In order to get the PR accepted,

  • Mark the feature as experimental (meaning it would change or remove in any time without major bump).
  • Details on README.md to explain why it is marked as experimental.

from fastify-cors.

Rai-Sahil avatar Rai-Sahil commented on June 28, 2024

Hi @danjenkins

I was thinking of working on this. I'm wondering do we need to do this part as well, if I fix the CORS thing. Also that is the error without fixing the CORS thing.

I've attached an example of what I've added as a patch to @fastify/cors which will need some extra work if these > changes are accepted... like only setting the response if the Access-Control-Request-Private-Network: true header is in > the request.

from fastify-cors.

danjenkins avatar danjenkins commented on June 28, 2024

@Rai-Sahil do you mean what is the error? The error is that the request fails because the browser doesn't get given the right headers in the response.

To do it properly we need to check if the request has the header Access-Control-Request-Private-Network before setting Access-Control-Allow-Private-Network in the response.

If you'd like to take this on and make a PR feel free :) Don't forget about the unit tests though. If not I can do a PR with unit tests.

from fastify-cors.

Rai-Sahil avatar Rai-Sahil commented on June 28, 2024

@danjenkins Thanks, I'll start working on it. I'll comment here if I have any further questions

from fastify-cors.

Fdawgs avatar Fdawgs commented on June 28, 2024

@danjenkins @Rai-Sahil

I'm -1 on this for the time being until all major browsers support this, not just Chromium. Thanks for raising it though!

Firefox's support for this is in prototype stage, and WebKit's position on this is tentative.

from fastify-cors.

danjenkins avatar danjenkins commented on June 28, 2024

@Fdawgs yeah, I'm in two minds but it's causing problems with things running in chrome canary and I'm pretty certain it will be causing problems in other versions of chrome too... hence why I wrote the patch :)

I'm good waiting to see how it all pans out and to carry on using my patch file for now...

πŸ€·β€β™‚οΈ

from fastify-cors.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.