fabric8-services / fabric8-jenkins-proxy

Apache License 2.0
1 stars 16 forks source link

Issue #299 Enable CORS properly #300

Closed kishansagathiya closed 6 years ago

kishansagathiya commented 6 years ago

Set AllowOrigins and AllowMethods Removed unnecessary CORS support for unexposed API and removed their tests Added tests for CORS support of exposed Jenkins API Fixes #299

invincibleJai commented 6 years ago

@kishansagathiya we need to allow localhost as well as this would be useful for testing/dev work while working with fabric8-ui

sthaha commented 6 years ago

@invincibleJai

@kishansagathiya we need to allow localhost as well as this would be useful for testing/dev work while working with fabric8-ui

I am not sure if we want to allow this for a production system. You should be able to turn off CORS using a browser extension/settings.

invincibleJai commented 6 years ago

I am not sure if we want to allow this for a production system. You should be able to turn off CORS using a browser extension/settings.

for all other OSIO services it is enabled I believe and it's just not me anyone working on fabric8-ui, would face issue in local dev.

kishansagathiya commented 6 years ago

@invincibleJai If we can turn off CORS by changing browser settings or can be done manually, that would be the right this to do. I found https://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome. Try to turn off CORS manually. If we can't do it, we would add it.

invincibleJai commented 6 years ago

@kishansagathiya you are right it can be done, my point is for none of the services in OSIO we need to do that and developers need to be informed about it as almost many of us run fabric8-ui in local with sourcing to prod/prod-preview

kishansagathiya commented 6 years ago

@invincibleJai I am making origins configurable, so we would be able to change it whenever we want.