Skip to main content
OCLC Support

DomainJavaScript (DJ)

Learn how to use the DomainJavaScript config.txt directive to specify an Internet domain whose URLs should be rewritten by EZproxy and additional JavaScript processing should occur for pages proxied from corresponding pages.

DomainJavaScript (also written as DJ) specifies an Internet domain whose URLs should be rewritten by EZproxy and that additional JavaScript processing should occur for pages proxied from any corresponding servers. If the port is included, then only servers using the specified port should be rewritten.

When EZproxy proxies content, it normally rewrites URLs that appear within the HTTP header and within HTML tags that accept URLs, but nothing else. If a server matches DomainJavaScript, when content is retrieved from wilddomain[:port] using the corresponding protocol and port, EZproxy will perform additional processing to rewrite anything that appears to be a URL in any retrieved content that is identified as being HTML, JavaScript, or XML.

If a database stanza contains Host, Domain, and DomainJavaScript directives that correspond to a specific protocol/host/port, DomainJavaScript takes priority and enables additional processing.

DomainJavaScript is a repeatable, position-dependent config.txt directive that interacts with database stanzas, groups, interface directives and IP ranges.

Qualifiers

Qualifier Description
wilddomain

If wilddomain does not contain *, then authorize the proxying of any server whose name is exactly wilddomain or whose name ends in a period followed by wilddomain.

If wilddomain contains at least one *, then authorize the proxying of any server whose name matches wilddomain where * matches 0 or more characters and ? matches any one character.

Options 

Option Description
port If port is included, then only servers using the specified port should be rewritten.

Syntax

DJ wilddomain[:port]

Examples

Proxy access to Some Database and perform additional processing on any servers in the somedb.com domain.

Title Some Database
URL http://www.somedb.com
DJ somedb.com

Related directives

 Host, HostJavaScript