Coder Social home page Coder Social logo

DELETE not working? about flask-cors HOT 3 CLOSED

corydolphin avatar corydolphin commented on August 25, 2024
DELETE not working?

from flask-cors.

Comments (3)

 avatar commented on August 25, 2024

Ok, I got what i was doing wrong now, if you look at the link i've provided above, the route which is tagged for DELETE requests actually has a duplicated route with same rule but different method (which is POST), and on that POST route I forgot to delete the @cross_origin decorator which allows only POST methods (I have those because before i upgraded to v1.7, i was using v1.3), and when i deleted it, it started to work like a charm now.

from flask-cors.

corydolphin avatar corydolphin commented on August 25, 2024

Hey Charles,

I'm glad you were able to figure things out!

  1. Is there any feedback you have on the documentation so future users do
    not run into this issue? I am planning to add logging of the CORS options
    on a per request basis, perhaps this would've helped the situation to make
    it clear that there was both app-level and decorator configuration
    occurring.
  2. I will make sure we support all HTTP verbs, including PATCH/DELETE/PUT.

Thanks for reporting the issue and double points for resolving and posting
the solution!

On Monday, August 18, 2014, Charles Jordan Cabero [email protected]
wrote:

Ok, I got what i was doing wrong now, if you look at the link i've
provided above, the route which is tagged for DELETE requests actually has
a duplicated route with same rule but different method (which is POST), and
on that POST route I forgot to delete the @cross_origin decorator which
allows only POST methods (I have those because before i upgraded to v1.7, i
was using v1.3), and when i deleted it, it started to work like a charm now.


Reply to this email directly or view it on GitHub
#55 (comment).

Sent from my mobile, please excuse spelling and brevity

from flask-cors.

adamelmohamad avatar adamelmohamad commented on August 25, 2024

life saver

from flask-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.