title: Enabling CORS in Kubernetes API server with HTTPS
body: <p>I'm trying to work with Kubernetes API server from Angular JS front-end app. The API server uses https endpoint. The front-end app is deployed to the other server.</p>
  
  <p>Despite the <code>--cors-allowed-origins=.*</code> (or <code>--cors-allowed-origins=["http://*"]</code>) param for <code>kube-apiserver</code> I can't access API because when I try to make GET XHR request, pre-flight <code>OPTIONS</code> request failed with 401 response without CORS headers.</p>
  
  <p>However, when I switch from https to http, everything works fine.</p>
  
  <p>Looks like I'm facing <a href="https://github.com/kubernetes/kubernetes/issues/16431" rel="nofollow">this</a> issue, which is already fixed and merged in the version of Kubernetes I'm using.</p>
  
  <p>Versions are Kubernetes 1.2.4, Angular JS 1.5.4 and Chrome 51.</p>
  
  <p>Could you tell me why it happens and how to fix this? I need a working solution for https.</p>