File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 55 < title > ActivityWatch</ title >
66 < link rel ="icon " type ="image/png " href ="/static/logo.png ">
77 < meta name ="viewport " content ="width=device-width,initial-scale=1.0 ">
8- < meta http-equiv ="Content-Security-Policy " content ="default-src 'self' 127.0.0.1:5600 127.0.0.1:5666 localhost:5666 *:27180 ws://*:27180 https://api.github.com/repos/ActivityWatch/activitywatch/releases/latest; img-src 'self' data:; font-src 'self' data:; style-src 'self' 'unsafe-inline'; object-src 'none'; script-src 'self' 'unsafe-eval' ">
8+ <!-- Verify with https://csp-evaluator.withgoogle.com/ -->
9+ < meta http-equiv ="Content-Security-Policy " content ="default-src 'self' <%= htmlWebpackPlugin.options.templateParameters.cspDefaultSrc %> https://api.github.com/repos/ActivityWatch/activitywatch/releases/latest; img-src 'self' data:; font-src 'self' data:; style-src 'self' 'unsafe-inline'; object-src 'none'; script-src 'self' 'unsafe-eval' ">
910 </ head >
1011 < body >
1112 < noscript >
Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ module.exports = {
1515 index : {
1616 entry : './src/main.js' ,
1717 template : './src/index.html' ,
18+ templateParameters : {
19+ cspDefaultSrc : process . env . NODE_ENV === 'production' ? '' : '*:5600 *:5666 ws://*:27180' ,
20+ } ,
1821 } ,
1922 } ,
2023 chainWebpack : config => {
@@ -40,8 +43,8 @@ module.exports = {
4043 plugins : [
4144 new webpack . IgnorePlugin ( { resourceRegExp : / ^ \. \/ l o c a l e $ / , contextRegExp : / m o m e n t $ / } ) ,
4245 new webpack . DefinePlugin ( {
43- AW_SERVER_URL : process . env . AW_SERVER_URL ,
4446 PRODUCTION : process . env . NODE_ENV === 'production' ,
47+ AW_SERVER_URL : process . env . AW_SERVER_URL ,
4548 COMMIT_HASH : JSON . stringify ( _COMMIT_HASH ) ,
4649 } ) ,
4750 new CopyWebpackPlugin ( [ { from : 'static/' , to : 'static' } ] ) ,
You can’t perform that action at this time.
0 commit comments