Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev.php for developer settings #2229

Merged
merged 2 commits into from
Aug 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);