SHINDIG-929 by Jakub Vrána - Invalid example configuration
[shindig.git] / php / config / container.php
blob785d37b44fc82115e258e71e8ef019f7f6682461
1 <?php
2 /**
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
21 /**
22 * The default configuration settings
24 * Put any site specific configuration in a config/local.php file, this way
25 * your configuration won't be lost when upgrading shindig.
27 * in local.php you only have to specificy the fields you want to overwrite
28 * with other values, for example on a production system you would probably have:
29 * $shindigConfig = array(
30 * 'debug' => false,
31 * 'allow_plaintext_token' => false,
32 * 'token_cipher_key' => 'MySecretKey',
33 * 'token_hmac_key' => 'MyOtherSecret',
34 * 'private_key_phrase' => 'MyCertificatePassword',
35 * 'person_service' => 'MyPeopleService',
36 * 'activity_service' => 'MyActivitiesService',
37 * 'app_data_service' => 'MyAppDataService',
38 * 'messages_service' => 'MyMessagesService',
39 * 'oauth_lookup_service' => 'MyOAuthLookupService'
40 * 'xrds_location' => 'http://www.mycontainer.com/xrds',
41 * 'check_file_exists' => false
42 * );
45 $shindigConfig = array(
46 // Show debug backtrace's. Disable this on a production site
47 'debug' => true,
48 // do real file_exist checks? Turning this off can be a big performance gain on prod servers but also risky & less verbose errors
49 'check_file_exists' => true,
51 // Allow plain text security tokens, this is only here to allow the sample files to work. Disable on a production site
52 'allow_plaintext_token' => true,
54 // Is a valid security token required to render a gadget? The token is required for doing signed preloads, but disallowing this
55 // can also help prevent external parties using your rendering server (only for the paranoid :)
56 'render_token_required' => false,
58 // Normally we would only rewrite the gadget's html if it has the <Optional feature="content-rewrite"> set, however with this you can
59 // force the content to always be rewritten
60 'rewrite_by_default' => false,
62 // Should we sanitize (remove scripts) from certain views? Right now this is useless, but once service sided templating and OSML is done
63 // this could be useful to force (fast) html only gadgets on the profile and/or home view. Set this to false or to an array of view names like: array('profile', 'home')
64 'sanitize_views' => false,
66 // Compress the inlined javascript, saves upto 50% of the document size
67 'compress_javascript' => true,
69 // Default refresh interval for proxy/makeRequest's if none is specified in the query
70 'default_refresh_interval' => 1209587,
72 // The URL Prefix under which shindig lives ie if you have http://myhost.com/shindig/php set web_prefix to /shindig/php
73 'web_prefix' => '',
74 // If you changed the web prefix, add the prefix to these too
75 'default_js_prefix' => '/gadgets/js/',
76 'default_iframe_prefix' => '/gadgets/ifr?',
78 // The X-XRDS-Location value for your implementing container, see http://code.google.com/p/partuza/source/browse/trunk/Library/XRDS.php for an example
79 'xrds_location' => '',
81 // Allow anonymous (READ) access to the profile information? (aka REST and JSON-RPC interfaces)
82 // setting this to false means you have to be authenticated through OAuth to read the data
83 'allow_anonymous_token' => true,
85 // The encryption keys for encrypting the security token, and the expiration of it. Make sure these match the keys used in your container/site
86 'token_cipher_key' => 'INSECURE_DEFAULT_KEY',
87 'token_hmac_key' => 'INSECURE_DEFAULT_KEY',
88 'token_max_age' => 60 * 60,
90 // Ability to customize the style thats injected into the gadget document. Don't forget to put the link/etc colors in shindig/config/container.js too!
91 'gadget_css' => 'body,td,div,span,p{font-family:arial,sans-serif;} a {color:#0000cc;}a:visited {color:#551a8b;}a:active {color:#ff0000;}body{margin: 0px;padding: 0px;background-color:white;}',
93 // P3P privacy policy to use for the iframe document
94 'P3P' => 'CP="CAO PSA OUR"',
96 // The locations of the various required components on disk. If you did a normal svn checkout there's no need to change these
97 'base_path' => realpath(dirname(__FILE__) . '/..') . '/',
98 'features_path' => realpath(dirname(__FILE__) . '/../../features') . '/',
99 'container_path' => realpath(dirname(__FILE__) . '/../../config') . '/',
100 'javascript_path' => realpath(dirname(__FILE__) . '/../../javascript') . '/',
102 // The OAuth SSL certificates to use, and the pass phrase for the private key
103 'private_key_file' => realpath(dirname(__FILE__) . '/../certs') . '/private.key',
104 'public_key_file' => realpath(dirname(__FILE__) . '/../certs') . '/public.crt',
105 'private_key_phrase' => 'partuza',
107 // the path to the json db file, used only if your using the JsonDbOpensocialService example/demo service
108 'jsondb_path' => realpath(dirname(__FILE__) . '/../../javascript/sampledata') . '/canonicaldb.json',
110 // Force these libraries to be external (included through <script src="..."> tags), this way they could be cached by the browser
111 'focedJsLibs' => '',
113 // Configurable classes. Change these to the class name to use, and make sure the auto-loader can find them
114 'blacklist_class' => 'BasicGadgetBlacklist',
115 'remote_content' => 'BasicRemoteContent',
116 'security_token_signer' => 'BasicSecurityTokenDecoder',
117 'security_token' => 'BasicSecurityToken',
118 'oauth_lookup_service' => 'BasicOAuthLookupService',
120 // Caching back-end's to use. Shindig ships with CacheFile, CacheApc and CacheMemcache support
121 // The data cache is primarily used for remote content (proxied files, gadget spec, etc)
122 // and the feature_cache is used to cache the parsed features xml structure and javascript
123 // On a production system you probably want to use CacheApc for features, and CacheMemcache for the data cache
124 'data_cache' => 'CacheFile',
125 'feature_cache' => 'CacheFile',
127 // RESTful API data service classes to use
128 // See http://code.google.com/p/partuza/source/browse/#svn/trunk/Shindig for a MySql powered example
129 'person_service' => 'JsonDbOpensocialService',
130 'activity_service' => 'JsonDbOpensocialService',
131 'app_data_service' => 'JsonDbOpensocialService',
132 'messages_service' => 'JsonDbOpensocialService',
134 // Also scan these directories when looking for <Class>.php files. You can include multiple paths by seperating them with a ,
135 'extension_class_paths' => '',
137 'userpref_param_prefix' => 'up_',
138 'libs_param_name' => 'libs',
140 // If you use CacheMemcache as caching backend, change these to the memcache server settings
141 'cache_host' => 'localhost',
142 'cache_port' => 11211,
143 'cache_time' => 24 * 60 * 60,
144 // If you use CacheFile as caching backend, this is the directory where it stores the temporary files
145 'cache_root' => '/tmp/shindig',
147 // connection timeout setting for all curl requests, set this time something low if you want errors reported
148 // quicker to the end user, and high (between 10 and 20) if your on a slow connection
149 'curl_connection_timeout' => '10',
151 // If your development server is behind a proxy, enter the proxy details here in 'proxy.host.com:port' format.
152 'proxy' => ''