Skip to content

Commit

Permalink
adapted the latest CSP security patch to include the gitcdn URL to query
Browse files Browse the repository at this point in the history
for newer firmware devices for RaspberryMatic. Also added "X-WebKit-CSP"
response header to serve older webbrowsers as well. In addition, neither
lighttpd nor ReGa will now output any "Server:" response header anymore
to prevents detailed analyses on the web server type. This refs #597.
  • Loading branch information
jens-maus committed Apr 10, 2019
1 parent 2caee8c commit fd5c89a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
@@ -1,10 +1,11 @@
setenv.set-response-header = (
"Server" => "Server"
"Server" => ""
)

setenv.add-response-header = (
"Content-Security-Policy" => "default-src 'self';frame-ancestors 'self';script-src 'unsafe-inline' 'unsafe-eval' 'self' *.homematic.com;style-src 'unsafe-inline' 'self';img-src 'self' data:",
"X-Content-Security-Policy" => "default-src 'self';frame-ancestors 'self';script-src 'unsafe-inline' 'unsafe-eval' 'self' *.homematic.com;style-src 'unsafe-inline' 'self';img-src 'self' data:",
"Content-Security-Policy" => "default-src 'self';frame-ancestors 'self';script-src 'unsafe-inline' 'unsafe-eval' 'self' *.homematic.com https://gitcdn.xyz ;style-src 'unsafe-inline' 'self';img-src 'self' data: ;connect-src 'self' http://*:8088",
"X-Content-Security-Policy" => "default-src 'self';frame-ancestors 'self';script-src 'unsafe-inline' 'unsafe-eval' 'self' *.homematic.com https://gitcdn.xyz ;style-src 'unsafe-inline' 'self';img-src 'self' data: ;connect-src 'self' http://*:8088",
"X-WebKit-CSP" => "default-src 'self';frame-ancestors 'self';script-src 'unsafe-inline' 'unsafe-eval' 'self' *.homematic.com https://gitcdn.xyz ;style-src 'unsafe-inline' 'self';img-src 'self' data: ;connect-src 'self' http://*:8088",
"X-Frame-Options" => "SAMEORIGIN",
"X-Content-Type-Options" => "nosniff",
"X-XSS-Protection" => "1; mode=block",
Expand Down
2 changes: 1 addition & 1 deletion buildroot-external/overlay/base/etc/lighttpd/lighttpd.conf
Expand Up @@ -119,7 +119,7 @@ server.document-root = server_root
##
## It would be nice to keep it at "lighttpd".
##
#server.tag = "lighttpd"
server.tag = ""

##
## store a pid file
Expand Down
Expand Up @@ -141,7 +141,7 @@ server.document-root = server_root
##
## It would be nice to keep it at "lighttpd".
##
#server.tag = "lighttpd"
server.tag = ""

##
## store a pid file
Expand Down

0 comments on commit fd5c89a

Please sign in to comment.