Skip to content

Commit

Permalink
Merge pull request #226 from Leantime/2.1-bump
Browse files Browse the repository at this point in the history
adding security headers to call chain
  • Loading branch information
marcelfolaron authored Apr 29, 2020
2 parents b7cbfbe + 00e89cd commit 080774f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/class.application.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public function start()
//Override theme settings
$this->overrideThemeSettings();

$this->loadHeaders();

ob_start();

if($this->login->logged_in()===false) {
Expand Down Expand Up @@ -94,6 +96,12 @@ public function start()

}

public function loadHeaders() {
header('X-Frame-Options: SAMEORIGIN');
header('X-XSS-Protection: 1; mode=block');
header('X-Content-Type-Options: nosniff');
}

public function overrideThemeSettings() {

if(isset($_SESSION["companysettings.logoPath"]) === false) {
Expand Down

0 comments on commit 080774f

Please sign in to comment.