Merge branch 'soon' into newtoolbar
This commit is contained in:
commit
a4286f1c83
@ -17,7 +17,7 @@ module.exports = {
|
|||||||
/*
|
/*
|
||||||
httpHeaders: {
|
httpHeaders: {
|
||||||
"Content-Security-Policy": [
|
"Content-Security-Policy": [
|
||||||
"default-serc 'none'",
|
"default-src 'none'",
|
||||||
"style-src 'unsafe-inline' 'self'",
|
"style-src 'unsafe-inline' 'self'",
|
||||||
"script-src 'self' 'unsafe-eval' 'unsafe-inline'",
|
"script-src 'self' 'unsafe-eval' 'unsafe-inline'",
|
||||||
"child-src 'self' cryptpad.fr *.cryptpad.fr",
|
"child-src 'self' cryptpad.fr *.cryptpad.fr",
|
||||||
@ -50,6 +50,12 @@ module.exports = {
|
|||||||
*/
|
*/
|
||||||
//websocketPort: 3000,
|
//websocketPort: 3000,
|
||||||
|
|
||||||
|
/* if you want to run a different version of cryptpad but using the same websocket
|
||||||
|
* server, you should use the other server port as websocketPort and disable
|
||||||
|
* the websockets on that server
|
||||||
|
*/
|
||||||
|
//useExternalWebsocket: false,
|
||||||
|
|
||||||
/* If Cryptpad is proxied without using https, the server needs to know.
|
/* If Cryptpad is proxied without using https, the server needs to know.
|
||||||
* Specify 'useSecureWebsockets: true' so that it can send
|
* Specify 'useSecureWebsockets: true' so that it can send
|
||||||
* Content Security Policy Headers that prevent http and https from mixing
|
* Content Security Policy Headers that prevent http and https from mixing
|
||||||
|
|||||||
@ -82,7 +82,7 @@ app.get('/api/config', function(req, res){
|
|||||||
var host = req.headers.host.replace(/\:[0-9]+/, '');
|
var host = req.headers.host.replace(/\:[0-9]+/, '');
|
||||||
res.setHeader('Content-Type', 'text/javascript');
|
res.setHeader('Content-Type', 'text/javascript');
|
||||||
res.send('define(' + JSON.stringify({
|
res.send('define(' + JSON.stringify({
|
||||||
websocketPath: config.websocketPath,
|
websocketPath: config.useExternalWebsocket ? undefined : config.websocketPath,
|
||||||
websocketURL:'ws' + ((useSecureWebsockets) ? 's' : '') + '://' + host + ':' +
|
websocketURL:'ws' + ((useSecureWebsockets) ? 's' : '') + '://' + host + ':' +
|
||||||
websocketPort + '/cryptpad_websocket',
|
websocketPort + '/cryptpad_websocket',
|
||||||
}) + ');');
|
}) + ');');
|
||||||
@ -95,6 +95,8 @@ httpServer.listen(config.httpPort,config.httpAddress,function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
var wsConfig = { server: httpServer };
|
var wsConfig = { server: httpServer };
|
||||||
|
|
||||||
|
if(!config.useExternalWebsocket) {
|
||||||
if (websocketPort !== config.httpPort) {
|
if (websocketPort !== config.httpPort) {
|
||||||
console.log("setting up a new websocket server");
|
console.log("setting up a new websocket server");
|
||||||
wsConfig = { port: websocketPort};
|
wsConfig = { port: websocketPort};
|
||||||
@ -103,3 +105,4 @@ var wsSrv = new WebSocketServer(wsConfig);
|
|||||||
Storage.create(config, function (store) {
|
Storage.create(config, function (store) {
|
||||||
NetfluxSrv.run(store, wsSrv, config);
|
NetfluxSrv.run(store, wsSrv, config);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|||||||
@ -47,7 +47,10 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="iframe-container">
|
<div id="iframe-container">
|
||||||
<iframe id="pad-iframe" src="inner.html"></iframe>
|
<iframe id="pad-iframe"></iframe>
|
||||||
|
<script>
|
||||||
|
document.getElementById('pad-iframe').setAttribute('src', 'inner.html?' + new Date().getTime());
|
||||||
|
</script>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -60,7 +60,10 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<iframe id="pad-iframe" src="inner.html"></iframe>
|
<iframe id="pad-iframe"></iframe>
|
||||||
|
<script>
|
||||||
|
document.getElementById('pad-iframe').setAttribute('src', 'inner.html?' + new Date().getTime());
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,10 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="iframe-container">
|
<div id="iframe-container">
|
||||||
<iframe id="pad-iframe" src="inner.html"></iframe>
|
<iframe id="pad-iframe"></iframe>
|
||||||
|
<script>
|
||||||
|
document.getElementById('pad-iframe').setAttribute('src', 'inner.html?' + new Date().getTime());
|
||||||
|
</script>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user