Begin Apache config for RESTful API collab/jeff/restful_api_proof_of_concept
authorJeff Godin <jgodin@tadl.org>
Wed, 10 Apr 2013 21:15:29 +0000 (14:15 -0700)
committerJeff Godin <jgodin@tadl.org>
Wed, 10 Apr 2013 21:15:29 +0000 (14:15 -0700)
Begin Apache config for experimental RESTful API.

The Perl handler mentioned here does not exist yet.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/examples/apache/eg_vhost.conf.in
Open-ILS/examples/apache_24/eg_vhost.conf

index 60605b3..93fd9d3 100644 (file)
@@ -559,6 +559,17 @@ RewriteRule .? - [E=locale:%{HTTP:Accept-Language}]
 </Location>
 
 # ----------------------------------------------------------------------------------
+# Experimental RESTful API endpoint
+# ----------------------------------------------------------------------------------
+<Location /api>
+    SetHAndler perl-script
+    PerlHandler OpenILS::WWW::RestAPI
+    Options +ExecCGI
+    PerlSendHeader On
+    allow from all
+</Location>
+
+# ----------------------------------------------------------------------------------
 # Conify - next-generation Evergreen administration interface
 # ----------------------------------------------------------------------------------
 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
@@ -695,7 +706,6 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
     ExpiresActive On
     ExpiresByType text/html "access plus 5 seconds"
 </Location>
-
 # Note: the template processor will decline handling anything it does not
 # have an explicit configuration for, which means it will fall back to 
 # Apache to serve the file.  However, in the interest of speed, go ahead 
index a5e3fcf..beac25c 100644 (file)
@@ -520,6 +520,17 @@ RewriteRule .? - [E=locale:%{HTTP:Accept-Language}]
 </Location>
 
 # ----------------------------------------------------------------------------------
+# Experimental RESTful API endpoint
+# ----------------------------------------------------------------------------------
+<Location /api>
+    SetHAndler perl-script
+    PerlHandler OpenILS::WWW::RestAPI
+    Options +ExecCGI
+    PerlSendHeader On
+    Require all granted
+</Location>
+
+# ----------------------------------------------------------------------------------
 # Conify - next-generation Evergreen administration interface
 # ----------------------------------------------------------------------------------
 RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]