Ranter
Join devRant
Do all the things like
				++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
				Sign Up
			Pipeless API
 
				From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
				Learn More
			Comments
		- 
				
				Yep. Annoying cross site security. Trying to make a query to an API and it's getting blocked by the browser because the API is not on the same domain as my site. Stupid....
- 
				
				 disolved5258yIf you're complaining about other domains having turned of CORS forthe resource you want it's basically like saying «gah, I hate the police, they always stop me from breaking into people's homes» 😀 disolved5258yIf you're complaining about other domains having turned of CORS forthe resource you want it's basically like saying «gah, I hate the police, they always stop me from breaking into people's homes» 😀
- 
				
				 Sarcaxxo2818yReverse proxy it with nginx to another domain and add the missing headers. Or proxy it directly to your domain. Sarcaxxo2818yReverse proxy it with nginx to another domain and add the missing headers. Or proxy it directly to your domain.
- 
				
				 Sarcaxxo2818y@bhouston combine Sarcaxxo2818y@bhouston combine
 https://nginx.com/resources/...
 and
 https://enable-cors.org/server_ngin...
 
 location /its/now/my/api/ {
 proxy_pass http://api.example.com/;
 add_header 'Access-Control-Allow-Origin' '*';
 }
- 
				
				@Sarcaxxo hmmm...darn. I have tried adding that header before. Maybe ajax is just the wrong tool to use. :(
Related Rants
- 
						
							ahmedam23 What only relying on JavaScript for HTML form input validation looks like What only relying on JavaScript for HTML form input validation looks like
- 
						
							 isaacWeisberg21Me and my wife are software engineers Started dating while doing a project together I guess you could say that... isaacWeisberg21Me and my wife are software engineers Started dating while doing a project together I guess you could say that...
- 
						
							 JMoodyFWD48My "Coding Standards" for my dev team 1.) Every developer thinks or have thought their shit don't stink. If y... JMoodyFWD48My "Coding Standards" for my dev team 1.) Every developer thinks or have thought their shit don't stink. If y...


FML!
Stupid cross origin policy, how I despise you!
Why must it always get in my way :(
undefined
web development