fabric8-services / fabric8-jenkins-proxy

Apache License 2.0
1 stars 16 forks source link

Issue #299 Enable CORS properly #304

Closed sthaha closed 6 years ago

sthaha commented 6 years ago

Previous attempt do enable CORS didn't have AllowHeaders = "*" set so passing in 'Authorization' header which was required for start api resulted in the following error:

Response to preflight request doesn't pass access control check:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'https://prod-preview.openshift.io' is therefore not allowed access.

This has been fixed by adding AllowedHeaders: []string{"*"},

Additionally, the patch also allows all standard CRUD methods and enables Debug logs for cors if config.GetDebugMode() is set

alien-ike commented 6 years ago

Ike Plugins (test-keeper)

Thank you @sthaha for this contribution!

It appears that no tests have been added or updated in this PR.

Automated tests give us confidence in shipping reliable software. Please add some as part of this change.

If you are an admin or the reviewer of this PR and you are sure that no test is needed then you can use the command /ok-without-tests as a comment to make the status green.

For more information please head over to official documentation. You can find there how to configure the plugin.

kishansagathiya commented 6 years ago

/ok-without-tests