Fixes for remoteSearchDriver.js and related. Untested, probably doesn't work. Somewha...
[lhc/web/wiklou.git] / js2 / apiProxyPage.js
1 /*
2 * mwProxy js2 page system.
3 *
4 * Invokes the apiProxy system
5 */
6
7 /*
8 * Since this is proxy server set a pre-append debug flag to know which debug msgs are coming from where
9 */
10
11 mw.conf['debug_pre'] = 'Proxy';
12
13 if ( !mwApiProxyConfig )
14 var mwApiProxyConfig = { };
15
16 // The default mwApiProxyConfig config
17 // (presently hard coded but should read from user and site config)
18 var mwApiProxyDefaultConfig = {
19 'master_whitelist' : [ 'en.wikipedia.org', 'localhost', '127.1.1.100' ],
20 'master_blacklist' : []
21 };
22
23 // User white_list should also be checked and configured at runtime.
24 js2AddOnloadHook( function() {
25 // build our configuration from the default and mwApiProxyConfig vars
26 mwApiProxyConfig = $j.extend( true, mwApiProxyDefaultConfig, mwApiProxyConfig );
27 $j.apiProxy( 'server', mwApiProxyConfig );
28 } );