| 1 |
<div class="d4p-group d4p-group-dashboard-card d4p-group-dashboard-basic"> |
| 2 |
<h3><?php _e("Security Headers", "gd-security-headers"); ?></h3> |
| 3 |
<div class="d4p-group-stats"> |
| 4 |
<ul class="gdsih-headers-overview"> |
| 5 |
<li> |
| 6 |
<a href="admin.php?page=gd-security-headers-settings&panel=global"><strong><i class="fa fa-file-code-o fa-fw"></i> <?php _e(".HTACCESS", "gd-security-headers"); ?></strong></a> |
| 7 |
<?php if (gdsih_settings()->get('htaccess_added', 'core')) { ?> |
| 8 |
<span class="ssl" style="background: #008800"><?php _e("Added", "gd-security-headers"); ?></span> |
| 9 |
<?php } else { ?> |
| 10 |
<span class="ssl" style="background: #880000"><?php _e("Not Used", "gd-security-headers"); ?></span> |
| 11 |
<?php } ?> |
| 12 |
<?php if (gdsih_settings()->get('htaccess_available', 'core')) { ?> |
| 13 |
<span class="ssl" style="background: #ec750c"><?php _e("Available", "gd-security-headers"); ?></span> |
| 14 |
<?php } else { ?> |
| 15 |
<span class="ssl" style="background: #000088"><?php _e("Not Available", "gd-security-headers"); ?></span> |
| 16 |
<?php } ?> |
| 17 |
</li> |
| 18 |
|
| 19 |
<?php |
| 20 |
|
| 21 |
$_data = gdsih_statistics()->headers(); |
| 22 |
|
| 23 |
foreach ($_data as $header) { |
| 24 |
|
| 25 |
?><li><a href="<?php echo $header['url']; ?>"> |
| 26 |
<strong><i class="fa fa-<?php echo $header['icon']; ?> fa-fw"></i> <?php echo $header['label']; ?></strong> |
| 27 |
</a> |
| 28 |
<?php if ($header['status']) { ?> |
| 29 |
<span class="active" style="background: #008800"><?php _e("Active", "gd-security-headers"); ?></span> |
| 30 |
<?php if (isset($header['csp'])) { ?> |
| 31 |
<?php if ($header['report']) { ?> |
| 32 |
<span class="report" style="background: #484848"><?php _e("Report Mode", "gd-security-headers"); ?></span> |
| 33 |
<?php } ?> |
| 34 |
<?php if ($header['live']) { ?> |
| 35 |
<span class="report" style="background: #ec750c"><?php _e("Live Mode", "gd-security-headers"); ?></span> |
| 36 |
<?php } ?> |
| 37 |
<?php } ?> |
| 38 |
<?php } else { ?> |
| 39 |
<span class="disabled" style="background: #880000"><?php _e("Disabled", "gd-security-headers"); ?></span> |
| 40 |
<?php } ?> |
| 41 |
<?php if ($header['recommended']) { ?> |
| 42 |
<span class="recommended" style="background: #000088"><?php _e("Recommended", "gd-security-headers"); ?></span> |
| 43 |
<?php } ?><?php if (isset($header['ssl']) && $header['ssl']) { ?> |
| 44 |
<span class="ssl" style="background: #ec750c"><?php _e("SSL Recommended", "gd-security-headers"); ?></span> |
| 45 |
<?php } ?> |
| 46 |
</li><?php |
| 47 |
|
| 48 |
} |
| 49 |
|
| 50 |
?> |
| 51 |
|
| 52 |
</ul><div class="d4p-clearfix"></div> |
| 53 |
</div> |
| 54 |
<div class="d4p-group-inner"> |
| 55 |
<h4><?php _e("HTTP Headers Security Recommendation", "gd-security-headers"); ?></h4> |
| 56 |
|
| 57 |
<p> |
| 58 |
<?php _e("Here are few recommendations to improve your website and your website users security.", "gd-security-headers"); ?> |
| 59 |
</p> |
| 60 |
|
| 61 |
<ul class="gdsih-list-rec"> |
| 62 |
<li><?php _e("Check out the list of available HTTP headers and enable and configure all the headers that are recommended.", "gd-security-headers"); ?></li> |
| 63 |
<?php if (gdsih_settings()->get('mode', 'csp') == 'report') { ?> |
| 64 |
<li><?php _e("Content Security Policy is currently configured as 'Report Only'. Make sure to switch it to 'Live Mode' once you set it up.", "gd-security-headers"); ?></li> |
| 65 |
<?php } ?> |
| 66 |
<?php if (!is_ssl()) { ?> |
| 67 |
<li><?php _e("You should use HTTPS everywhere on your website. For that, you need to configure valid and trusted SSL certificate on your server.", "gd-security-headers"); ?></li> |
| 68 |
<?php } ?> |
| 69 |
<li><?php _e("Make sure to keep your website updated so that all core security updates are applied.", "gd-security-headers"); ?></li> |
| 70 |
</ul> |
| 71 |
<h4><?php _e("Apache HTACCESS", "gd-security-headers"); ?></h4> |
| 72 |
|
| 73 |
<p> |
| 74 |
<?php _e("To use headers via HTACCESS on Apache servers (or in Apache config), make sure that Apache module MOD_HEADERS is enabled.", "gd-security-headers"); ?> |
| 75 |
</p> |
| 76 |
</div> |
| 77 |
<div class="d4p-group-footer"> |
| 78 |
<a href="admin.php?page=gd-security-headers-settings" class="button-primary"><?php _e("Plugin Settings", "gd-security-headers"); ?></a> |
| 79 |
<a href="admin.php?page=gd-security-headers-headers" class="button-primary"><?php _e("Generated Headers", "gd-security-headers"); ?></a> |
| 80 |
</div> |
| 81 |
</div> |