IUSCA / SQAN

Scalable Quality Assurance for Neuroimaging - (SQAN): A full-stack system solution for extracting, translating, and logging (ETL) + web portal-based quality-control verification of DICOM-formatted medical imaging data/metadata.
https://sqan.sca.iu.edu/
Other
8 stars 3 forks source link

SQAN: Update user details results in server error #154

Closed charlesbrandt closed 4 years ago

charlesbrandt commented 4 years ago

When attempting to issue an http.patch for updating details for a user,

        this.$http
          .patch(
            `${this.$config.api}/user/` + this.userdataLocal._id,
            this.userdataLocal
          )

Firefox reports:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://sqan-test.sca.iu.edu/api/qc/user/5ea3339c8a601b65e7cf46d6. (Reason: CORS request did not succeed).

Error: Network Error

I'm planning to explore what's happening at the api level, but thought I'd write it up in case anyone else has encountered this already.

youngmd commented 4 years ago

Try this again. I added PATCH to the nginx Access-Control-Allow-Methods

charlesbrandt commented 4 years ago

That fixed it. Thank you!