mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 06:00:53 +03:00
Implemented FxA
This commit is contained in:
17
server/initScript.js
Normal file
17
server/initScript.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const html = require('choo/html');
|
||||
const raw = require('choo/html/raw');
|
||||
|
||||
module.exports = function(state) {
|
||||
// return '';
|
||||
return state.cspNonce
|
||||
? html`
|
||||
<script nonce="${state.cspNonce}">
|
||||
const userInfo = ${
|
||||
state.user.loggedIn ? raw(JSON.stringify(state.user)) : 'null'
|
||||
};
|
||||
const downloadMetadata = ${
|
||||
state.downloadMetadata ? raw(JSON.stringify(state.downloadMetadata)) : '{}'
|
||||
};
|
||||
</script>`
|
||||
: '';
|
||||
};
|
||||
Reference in New Issue
Block a user