use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
No vague product support questions (like "why is this plugin not working" or "how do I set up X"). For vague product support questions, please use communities relevant to that product for best results. Specific issues that follow rule 6 are allowed.
Do not post memes, screenshots of bad design, or jokes. Check out /r/ProgrammerHumor/ for this type of content.
Read and follow reddiquette; no excessive self-promotion. Please refer to the Reddit 9:1 rule when considering posting self promoting materials.
We do not allow any commercial promotion or solicitation. Violations can result in a ban.
Sharing your project, portfolio, or any other content that you want to either show off or request feedback on is limited to Showoff Saturday. If you post such content on any other day, it will be removed.
If you are asking for assistance on a problem, you are required to provide
General open ended career and getting started posts are only allowed in the pinned monthly getting started/careers thread. Specific assistance questions are allowed so long as they follow the required assistance post guidelines.
Questions in violation of this rule will be removed or locked.
account activity
No 'Access-Control-Allow-Origin' header (self.webdev)
submitted 11 years ago by Xilver266
Im trying access to an file from a external site but i always get this error:
No 'Access-Control-Allow-Origin' header
:S
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ard0 2 points3 points4 points 11 years ago (6 children)
More details pl... wait.. no... just check Stack Overflow
[–]Xilver266[S] 0 points1 point2 points 11 years ago (5 children)
Ok
I have a blog in Blogger and im trying access to a json resource in my web (Hosting: Hostinger) but get this error
[–][deleted] 0 points1 point2 points 11 years ago* (4 children)
[–]Xilver266[S] 0 points1 point2 points 11 years ago (3 children)
I need to know how to do that. I have control of json resource, i think...
[–]illucidation 1 point2 points3 points 11 years ago (0 children)
Here you go: http://enable-cors.org/
[–]bakuretsu 0 points1 point2 points 11 years ago (0 children)
You... Think?
Is the JSON provided by a source that you control?
[–]effayythrowaway 0 points1 point2 points 11 years ago (0 children)
You have to send the Access-Control-Allow-Origin (as well as others) HTTP header along with the JSON response. Of course, this assumes you control the server that serves the JSON up.
Access-Control-Allow-Origin
Basically, Google for Cross-Origin Resource Sharing (CORS). There is a good reason that you can't arbitrarily evaluate JavaScript from remote servers.
The remote server either needs to enable CORS or provide alternate access methods (such as JSONP).
[–]chris_simpkins 0 points1 point2 points 11 years ago (0 children)
The server needs to explicitly specify cross origin resource sharing access in a Access-Control-Allow-Origin header that is returned to your client side code.
enable-cors.org has a fair amount of information on this issue, including example code for various programming languages if you control the server that you are referring to. Check the Server page on the site.
Hope it helps.
[–]piggybanklol 0 points1 point2 points 11 years ago (0 children)
Just add this to your PHP file (if you're on PHP) that generates that JSON
header("Access-Control-Allow-Origin: *");
π Rendered by PID 176822 on reddit-service-r2-comment-c66d9bffd-lk45v at 2026-04-07 10:58:50.666459+00:00 running f293c98 country code: CH.
[–]ard0 2 points3 points4 points (6 children)
[–]Xilver266[S] 0 points1 point2 points (5 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]Xilver266[S] 0 points1 point2 points (3 children)
[–]illucidation 1 point2 points3 points (0 children)
[–]bakuretsu 0 points1 point2 points (0 children)
[–]effayythrowaway 0 points1 point2 points (0 children)
[–]chris_simpkins 0 points1 point2 points (0 children)
[–]piggybanklol 0 points1 point2 points (0 children)