mirror of https://github.com/xwiki-labs/cryptpad
Merge branch 'plugins' into 2024.6-test
This commit is contained in:
commit
49b87146b2
|
@ -234,6 +234,20 @@ server {
|
|||
add_header Cross-Origin-Embedder-Policy require-corp;
|
||||
}
|
||||
|
||||
location ~ ^/extensions.js {
|
||||
proxy_pass http://localhost:3000;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
# These settings prevent both NGINX and the API server
|
||||
# from setting the same headers and creating duplicates
|
||||
proxy_hide_header Cross-Origin-Resource-Policy;
|
||||
add_header Cross-Origin-Resource-Policy cross-origin;
|
||||
proxy_hide_header Cross-Origin-Embedder-Policy;
|
||||
add_header Cross-Origin-Embedder-Policy require-corp;
|
||||
}
|
||||
|
||||
# Requests for blobs and blocks are now proxied to the API server
|
||||
# This simplifies NGINX path configuration in the event they are being hosted in a non-standard location
|
||||
# or with odd unexpected permissions. Serving blobs in this manner also means that it will be possible to
|
||||
|
|
|
@ -2,6 +2,13 @@ define([
|
|||
'optional!/extensions.js'
|
||||
], (Extensions) => {
|
||||
const ext = {};
|
||||
|
||||
ext.getExtensions = id => {
|
||||
let e = ext[id];
|
||||
if (!Array.isArray(e)) { e = []; }
|
||||
return e;
|
||||
};
|
||||
|
||||
if (!Array.isArray(Extensions) || !Extensions.length) { return ext; }
|
||||
|
||||
let all = Extensions.slice();
|
||||
|
@ -48,11 +55,5 @@ define([
|
|||
});
|
||||
}
|
||||
|
||||
ext.getExtensions = id => {
|
||||
let e = ext[id];
|
||||
if (!Array.isArray(e)) { e = []; }
|
||||
return e;
|
||||
};
|
||||
|
||||
return ext;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue