Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preflight response does not include PATCH in the "Access-Control-Allow-Methods header" #1193

Open
mohitparmar1 opened this issue Nov 9, 2024 · 5 comments

Comments

@mohitparmar1
Copy link

Describe the bug
The PATCH method triggers a CORS error when attempting to update the profile. The preflight response does not include PATCH in the Access-Control-Allow-Methods header.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://cloud.idurarapp.com and log in.
  2. Trigger a profile update that uses a PATCH request.
  3. Check the console/network tab.
  4. See error

Expected behavior
The PATCH request should be allowed, and the update should proceed without a CORS error.

Screenshots
Screenshot 2024-11-09 151352

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@mohitparmar1
Copy link
Author

@salahlalami if it is a valid issue I would like to work on this!

mohitparmar1 added a commit to mohitparmar1/idurar-erp-crm that referenced this issue Nov 9, 2024
@surjeet88
Copy link

surjeet88 commented Nov 10, 2024

Hi @mohitparmar1 i have a cloned copy of the code on my local machine there i have an admin user made through setup file when i update the profile in there then i am not seeing any error but in the deployed code there is indeed an error.It's my first time working on an open source project.Could you guide why this is happening?

@mohitparmar1
Copy link
Author

mohitparmar1 commented Nov 10, 2024

Hi @mohitparmar1 i have a cloned copy of the code on my local machine there i have an admin user made through setup file when i update the profile in there then i am not seeing any error but in the deployed code there is indeed an error.It's my first time working on an open source project.Could you guide why this is happening?

Yes, but the changes are not updating there, suppose someone changed their last name it is not showing new changes after the update

@surjeet88
Copy link

Here is my name before change
Screenshot from 2024-11-10 12-01-28
and this is after
Screenshot from 2024-11-10 12-01-42
@mohitparmar1

@surjeet88
Copy link

Hi @mohitparmar1 i have a cloned copy of the code on my local machine there i have an admin user made through setup file when i update the profile in there then i am not seeing any error but in the deployed code there is indeed an error.It's my first time working on an open source project.Could you guide why this is happening?

Yes, but the changes are not updating there, suppose someone changed their last name it is not showing new changes after the update

I saw your PR you added the method parameter to the cors middleware it is necessary for patch.I am new to open source as i could understand you changed just one line is that correct or you made some other changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants