A useful feature that was added to ezproxy is the addition to a xml based webservice which you can send a URL and it will return the ezproxy information if it’s in the exproxy database or an false statement if not. This allows you to build applications that can go through URLs and rewrite them if they are valid resources. Think WAG the Dog Localizer. We’re currently migrating to ezproxy so this may come in handy with assisting people with updating links and verifying things are set-up properly. There’s not much documentation on this feature but hopefully the following will help you. Thanks to Ross Singer for pointing out the feature and to Rob Casson for giving me the result schema.
To Enable It
Straight from the changelog:
Adds ezproxy.cfg directive ProxyURLPassword to specify a password that activates new EZproxy's support to respond to XML request sent to /proxy_url.
From what I’ve seen this would be posted to the http://exproxyserver:port/proxy_url page. You can also use GET by doing /proxy_url?xml= followed by the request xml. If you use POST you will want to name your field as ‘xml’.
<?xml version="1.0"?> <proxy_url_request password="secret"> <urls> <url>http://www.somedb.com</url> <url>http://www.otherdb.com/search/</url> </urls> </proxy_url_request>
<proxy_url_response> <proxy_urls> <url proxy="true" scheme="http" hostname="ezproxyserver" port="2048" login_path="/login?qurl=" encode="true">http://epnet.com</url> </proxy_urls> </proxy_url_response>
Where epnet.com is the vendor name and the information regarding your ezproxy server is included as attributes. A response for a URL that should not be proxied would look like this:
<?xml version="1.0" encoding="UTF-8"?> <proxy_url_response> <proxy_urls> <url proxy="false" scheme="" hostname="" port="" login_path="" encode="false">http://www.google.com</url> </proxy_urls> </proxy_url_response>