title: Jhipster CORS enable
body: <p>I am using Jhipster to generate API.</p>
  
  <p>My api is on lets call it :</p>
  
  <blockquote>
    <p><a href="https://api.staging.test.com/" rel="noreferrer">https://api.staging.test.com/</a></p>
  </blockquote>
  
  <p>and my FE app is on :</p>
  
  <blockquote>
    <p><a href="https://staging.test.com/" rel="noreferrer">https://staging.test.com/</a></p>
  </blockquote>
  
  <p>Here is my config for Cors enable in application-prod.yml</p>
  
  <pre><code>cors:
       allowed-origins: "https://staging.test.com/"
       allowed-methods: "*"
       allowed-headers: GET, PUT, POST, DELETE, OPTIONS
       exposed-headers: "Authorization,Link,X-Total-Count"
       allow-credentials: true
       max-age: 1800
  </code></pre>
  
  <p>I still get this error :</p>
  
  <blockquote>
    <p>Response to preflight request doesn't pass access control check: No
    'Access-Control-Allow-Origin' header is present on the requested
    resource. Origin '<a href="https://staging.test.com" rel="noreferrer">https://staging.test.com</a>' is therefore not
    allowed access. If an opaque response serves your needs, set the
    request's mode to 'no-cors' to fetch the resource with CORS disabled.</p>
  </blockquote>
  
  <p>Is there anything more that needs to be done in Spring boot to enable CORS ?</p>