angularjs - Angular and Node JS CORS issue with sub domain forwarding controlled by GoDaddy -


i have api(nodejs rest) , angular ui hosted on aws ec2 instance(ec2-44-99-205-99.us-east-1-1.compute.amazonaws.com). ui makes rest calls node on same ec2. domain on godaddy subdomain forwarding configured forward request above ec2 public ip. when hit ui index.html index html loaded , on subsequent operations on ui such clicking forgot pwd failing following error

xmlhttprequest cannot load xyz.com/api/auth/forgotpassword/abc@xyz.com. redirect 'xyz.com/api/auth/forgotpassword/abc@xyz.com' 'xyz.com/api/auth/forgotpassword/abc@xyz.com' has been blocked cors policy: no 'access-control-allow-origin' header present on requested resource. origin 'ec2-44-99-205-99.us-east-1-1.compute.amazonaws.com' therefore not allowed access.

i have added required headers in api layer on node ( allow origin * etc) , added required code changes in angular code handle cors still above error. don't have control on headers sent godadday subdomain forwarding facility.

funny thing when hit same api url directly in browser bar don't error within code in angular have error popping appreciated.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -