Skip to content

Commit

Permalink
Merge pull request #2229 from WPO-Foundation/devphp
Browse files Browse the repository at this point in the history
dev.php for developer settings
  • Loading branch information
jefflembeck committed Aug 5, 2022
2 parents 4be15cf + defa8d9 commit 8261486
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,7 @@ www/beanstalk.php
*/.vscode/*

# compiled Blade tamplates
www/resources/compiled
www/resources/compiled

# developer settings
www/dev.php
7 changes: 6 additions & 1 deletion www/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// Use of this source code is governed by the Polyform Shield 1.0.0 license that can be
// found in the LICENSE.md file.


// Load app and composer-based dependencies
require_once(__DIR__ . '/../vendor/autoload.php');

Expand Down Expand Up @@ -103,6 +102,12 @@ date_default_timezone_set('UTC');
extract($_POST, EXTR_SKIP | EXTR_PREFIX_ALL | EXTR_REFS, 'req');
extract($_GET, EXTR_SKIP | EXTR_PREFIX_ALL | EXTR_REFS, 'req');

// load dev settings
$dev_settings = __DIR__ . '/dev.php';
if (file_exists($dev_settings)) {
require_once $dev_settings;
}

// Prevent embedding except for pages that were explicitly designed to be embedded (video)
if (!isset($ALLOW_IFRAME) || !$ALLOW_IFRAME) {
header('X-Frames-Options: sameorigin');
Expand Down
4 changes: 4 additions & 0 deletions www/dev.sample.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php

error_reporting(E_ALL);
ini_set('display_errors', 1);

0 comments on commit 8261486

Please sign in to comment.