Skip to content

Commit

Permalink
Update glossary
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoli79 committed Feb 4, 2025
1 parent 429b4c2 commit c71d0ba
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
42 changes: 42 additions & 0 deletions www/enable_portal.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

// Copyright 2024 Catchpoint Systems Inc.
// Use of this source code is governed by the Polyform Shield 1.0.0 license that can be
// found in the LICENSE.md file.
include 'common.inc';

use WebPageTest\Util;

if (!isset($request_context)) {
header("Location: /");
return;
}

$user = $request_context->getUser();
if (is_null($user)) {
header("Location: /");
return;
}

if ($user->isAnon()) {
header("Location: /");
return;
}

if ($user->isFree() && !Util::getSetting('cp_portal_enable_free')) {
header("Location: /");
return;
}

if ($user->isPaid() && !Util::getSetting('cp_portal_enable_pro')) {
header("Location: /");
return;
}

$value = isset($req_value) ? (bool) $req_value : true;
$client = $request_context->getClient();
$portal_enabled = $client->enablePortalPreview($value);
$location = $portal_enabled ? Util::getSetting('cp_portal_url') : '/';

header('Location: ' . $location);
return;
2 changes: 1 addition & 1 deletion www/resources/views/partials/glossary.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<li>What is checked: Checked to see if it is hosted on a known CDN (CNAME mapped to a known CDN network).
80% of the static resources need to be served from a CDN for the overall page to be considered using a CDN.
The current list of known CDN's is
<a href="https://github.com/WPO-Foundation/wptagent/blob/master/internal/optimization_checks.py#L48">here</a>.
<a href="https://github.com/catchpoint/WebPageTest.agent/blob/master/internal/optimization_checks.py#L67">here</a>.
</li>
</ul>
</dd>
Expand Down

0 comments on commit c71d0ba

Please sign in to comment.