paint-brush
AWS Elastic load balance and CORS issues by@xameeramir
19,319 reads
19,319 reads

AWS Elastic load balance and CORS issues

by Zameer AnsariApril 5th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

We have an <a href="//angular.io/" target="_blank">Angular 4</a> front end hosted on <a href="//docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html" target="_blank">AWS S3 bucket</a>, with an <a href="//aws.amazon.com/elasticloadbalancing/" target="_blank">AWS elastic load balancer</a> behind which we have multiple <a href="//aws.amazon.com/ec2/" target="_blank">EC2 servers</a> each running a <a href="//pm2.keymetrics.io/" target="_blank">pm2</a> service behind an <a href="//www.nginx.com/" target="_blank">nginx</a> proxy.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - AWS Elastic load balance and CORS issues
Zameer Ansari HackerNoon profile picture

In one of my projects, I’m getting issues while connecting to AWS load balancers - I have written this post to secure my studies in this regard.
We have an front end hosted on , with an behind which we have multiple each running a service behind an proxy. The REST requests from the front end reaches the server without issues:
  • without the AWS elastic load balancer and directly to the EC2 server
The REST requests breaks with the CORS errors from the front end and not reaches the server:
  • with the AWS elastic load balancer and not directly to the EC2 server
Although we’re not yet successful but which we have tried so far:
  1. Allowed CORS in the , example  — done
  2. Allowed CORS in the back end using  — done
  3. Allowed CORS in the  — done
  4. Allow CORS on the load balancer’s front — not done
Based on my studies so far:
  • Per @Max@AWS, we
  • Per @Brian@AWS, we’d
  • This was a especially for chrome
  • As per @Arun@AWS, the
  • Not sure if the
  • Per @hescar, we can also try
  • Looks like,
  • The AWS staff says that
  • The to ELB CORS support still looks open
  • The says that the JSON Content-Type is not allowed in simple/actual requests

Requests only use the GET or POST HTTP methods. If the POST method is used, then Content-Type can only be one of the following: application/x-www-form-urlencoded, multipart/form-data, or text/plain.

Hope this helps to some extent.
바카라사이트 바카라사이트 온라인바카라