Notes /
Cross-OriginRequestBlocked"Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the resource originated." (Wikipedia) ResourcesTest CaseFor a CORS Test Case
Below is the output: .htaccess Filehttp://enable-cors.org/server_apache.html says that to create a Header set Access-Control-Allow-Origin "*" When I go to 50.174.113.205 - - [11/Jan/2016:08:35:35 -0800] "GET /.htaccess HTTP/1.1" 404 6440 And [Mon Jan 11 08:50:34 2016] [error] [client 50.174.113.205] client denied by server configuration: /home/www/terraswarmwww/.htaccess Also, going to http://www.terraswarm.org/.htaccess from a browser fails. It could be that downloading the .htaccess file is not permitted, so let's try a different route: Apache Configuration/usr/local/apache/conf/extra/httpd-vhosts.conf was updated with: <VirtualHost 128.32.48.150:80> ServerName www.TerraSwarm.org DocumentRoot /home/www/terraswarmwww ... # See {$ACCESSORS_HOME}/wiki/Main/Cross-OriginRequestBlocked Header set Access-Control-Allow-Origin "*" </VirtualHost> Then, as root: (:source lang="bash":) [root@moog terraswarmwww]# apachectl -t Syntax OK [root@moog terraswarmwww]# /etc/init.d/apachectl graceful [root@moog terraswarmwww]# In Firefox, enable Tools->Web Developer -> Toggle Tools Go to In the Outputs section, the contents of the website will appear and <Directory>Using <Directory /> # See {$ACCESSORS_HOME}/wiki/Main/Cross-OriginRequestBlocked Header set Access-Control-Allow-Origin "*" </Directory> access-control-allow-origin:"*"
To set this just for https://ptolemy.berkeley.edu/accessors, the section for TerraSwarm in <Location /accessors > # See {$ACCESSORS_HOME}/wiki/Main/Cross-OriginRequestBlocked Header set Access-Control-Allow-Origin "*" </Location> See Also |