title: CORS error while accessing endpoint from S3 static website
body: <p>I am calling my rest endpoint from aws s3 static website and getting below CORS error</p>
  <pre><code>Access to fetch at 'http://[my-public-ip]:5225/user/1' 
  from origin 'http://[my-bucket].s3-website-us-east-1.amazonaws.com' 
  has been blocked by CORS policy: The request client is not a secure context 
  and the resource is in more-private address space `private`.
  </code></pre>
  <p>I have below code in my springboot for allowing cors, also i tried various other combinations like allowedOrigins, allowedMethods but none of them working</p>
  <pre><code>@Override
  public void addCorsMappings( CorsRegistry registry ) {
    registry.addMapping( &quot;/**&quot; );
  }
  </code></pre>
  <p>Also i tried adding cors setting in s3</p>
  <pre><code>[
      {
          &quot;AllowedHeaders&quot;: [
              &quot;Authorization&quot;
          ],
          &quot;AllowedMethods&quot;: [
              &quot;GET&quot;,
              &quot;HEAD&quot;
          ],
          &quot;AllowedOrigins&quot;: [
              &quot;*&quot;
          ],
          &quot;ExposeHeaders&quot;: [
              &quot;Access-Control-Allow-Origin&quot;
          ]
      }
  ]
  </code></pre>
  <p>am i missing something?</p>