Skip to content

CORS issue #83

Description

@StuGraySD

Hi

I'm trying to use this code to start a job in Jenkins
var jenkins = require('jenkins')({ baseUrl: 'MyBaseURL', crumbIssuer: false });

The code is hosted on AWS S3 and the CORS config is this
let jenkins = require('jenkins')({ baseUrl: baseUrl, crumbIssuer: false });

And we have the Jenkins plugin configured like this
Access-Control-Allow-Origins: *
Access-Control-Allow-Methods: *
Access-Control-Allow-Headers: *
Access-Control-Allow-Headers: *
Access-Control-Expose-Headers: 999

This seems to work when we access the s3 website via the internet but we get this message when we go via a proxy within our corporate network
"has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled."

Any advice on how to debug/resolve this please?

Many thanks for the awesome API! it's helping us a lot.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions