Code Monkey home page Code Monkey logo

Comments (13)

fafhrd91 avatar fafhrd91 commented on May 8, 2024 3

I'll check what I can do.

from actix-web.

krircc avatar krircc commented on May 8, 2024 2

@fafhrd91 my font-end code use vuejs. usually it use node sever in development at port 3000. my backend code use actix sever at port 8088.
in vuejs :

axios.get('http://localhost:8088/api/user_info', auth.getAuthHeader() )

but because CORS .web browsers sending a preflight OPTIONS request asking what resources it is allowed to access on the server, then after being given a resonse containing certain information in it's header a browser will send the actual GET/PUT/POST/etc query to the server, with no response it will not do this and cause Cross Site Scripting errors to be reported.
THERE is an issues in Rocker : Lack of handling for CORS/OPTIONS

from actix-web.

AlbanMinassian avatar AlbanMinassian commented on May 8, 2024 1

Hello

here tests around "cors" for nodesjs/express :

Some tests

Info

from actix-web.

fafhrd91 avatar fafhrd91 commented on May 8, 2024

What is OPTIONS?

I have plans for cors support, but it is lower priority at the moment

from actix-web.

krircc avatar krircc commented on May 8, 2024

I'M doing a person project. now it use vuejs, I also want to try yew(it's cool). so actix having a "native" built in support CORS would be grate.
..

from actix-web.

krircc avatar krircc commented on May 8, 2024

@fafhrd91 thank you very much!

from actix-web.

fafhrd91 avatar fafhrd91 commented on May 8, 2024

@krircc could you explain how CORS/OPTIONS should work from your perspective?

from actix-web.

fafhrd91 avatar fafhrd91 commented on May 8, 2024

thanks, that is useful

from actix-web.

krircc avatar krircc commented on May 8, 2024

@fafhrd91
there is also a good library for rocket-cors
I don't know Is it helpful? I'm a noder. actix is more faster than node frameworks.

from actix-web.

fafhrd91 avatar fafhrd91 commented on May 8, 2024

I added basic preflight support,

does anyone wants to do more work on cars support? otherwise I will complete it later this week

from actix-web.

krircc avatar krircc commented on May 8, 2024

@fafhrd91 awesome! more and more projects use restful api , even grphaql sever let font-end and backend separation , It's friend for many clients application, now actix-web is the first rust framework friendly support It 🥇 .

from actix-web.

fafhrd91 avatar fafhrd91 commented on May 8, 2024

I think cors support is completed.

@krircc could you test it on your project? also could you maybe add user guide section related to CORS/OPTIONS

from actix-web.

krircc avatar krircc commented on May 8, 2024

@fafhrd91 ok Iwill write a blog in actix website.

from actix-web.

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.