Skip to content

actix_cors is always returing 404 on OPTIONS requests #580

Closed

Description

@alvarosan

Disclaimer: I have looked around for a solution for this and I could not find anyone else having this problem so I might be missing something fundamental.

I could make actix_cors work in my server (actix_web = "4.2.1" , actix_cors = "0.6.2"). No errors are thrown at runtime when starting the application but whenever I make an OPTIONS request to a registered endpoint I keep getting a 404 response.

After several attempts to fix this, I found your reference application (examples/cors) and unfortunately I could also reproduce the problem there. It is unclear what is happening (I could reproduce it both in the browser and with postman). Here are some screenshots:

Working POST request:

Screenshot from 2022-11-08 11-02-52

Failing OPTIONS request:
Screenshot from 2022-11-08 11-03-14

Let me know if you need more info, thanks.

Alvaro

Activity

  1. locked and limited conversation to collaborators on Nov 8, 2022
  2. converted this issue into a discussion #581 on Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions