PluginProbe
GD Security Headers / 1.6
GD Security Headers v1.6
trunk 1.0 1.1 1.1.1 1.2 1.3 1.4 1.5 1.6 1.6.1 1.7 1.7.1 1.8 1.9
gd-security-headers / forms / headers.php

headers.php in GD Security Headers 1.6, at forms/headers.php

101 lines 3.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('ABSPATH')) { exit; }
4
5 include(GDSIH_PATH.'forms/shared/top.php');
6
7 $list = gdsih()->build_headers_to_array();
8
9 ?>
10
11 <div class="d4p-content-left">
12 <div class="d4p-panel-scroller d4p-scroll-active">
13 <div class="d4p-panel-title">
14 <i aria-hidden="true" class="fa fa-code"></i>
15 <h3><?php _e("Headers", "gd-security-headers"); ?></h3>
16 </div>
17 <div class="d4p-panel-info">
18 <?php _e("All HTTP headers generated so they can be copied into server side config. Headers are generated based on the plugin settings.", "gd-security-headers") ?>
19 <br/><br/><strong><?php _e("If you are not sure how to do that, please consult with your website hosting company support.", "gd-security-headers") ?></strong>
20 </div>
21 <div class="d4p-return-to-top">
22 <a href="#wpwrap"><?php _e("Return to top", "gd-security-headers"); ?></a>
23 </div>
24 </div>
25 </div>
26 <div class="d4p-content-right">
27 <div class="d4p-group d4p-group-extra d4p-group-important">
28 <h3><?php _e("Apache Server", "gd-security-headers"); ?></h3>
29 <div class="d4p-group-inner">
30 <p><?php _e("If you use Apache server, this plugin can add headers automatically into HTACCESS file. But, if you have disabled HTACCESS or you prefer using global server config, you can copy rules from here.", "gd-security-headers"); ?></p>
31 <div class="gdsih-code-block">
32 <pre>&lt;IfModule mod_headers.c><br/><?php
33
34 $first = true;
35 foreach ($list as $key => $value) {
36 if (!$first) {
37 echo '<br/>';
38 }
39
40 echo ' # '.$key.'<br/>';
41 echo ' Header set '.$value.'<br/>';
42
43 $first = false;
44 }
45
46 ?>&lt;/IfModule></pre>
47 </div>
48 </div>
49 </div>
50
51 <div class="d4p-group d4p-group-extra d4p-group-important">
52 <h3><?php _e("Nginx Server", "gd-security-headers"); ?></h3>
53 <div class="d4p-group-inner">
54 <p><?php _e("If you use NGINX server, you can copy rules from here to add to the server 'conf' file.", "gd-security-headers"); ?></p>
55 <div class="gdsih-code-block">
56 <pre><?php
57
58 $first = true;
59 foreach ($list as $key => $value) {
60 if (!$first) {
61 echo '<br/>';
62 }
63
64 echo '# '.$key.'<br/>';
65 echo 'add_header '.$value.';<br/>';
66
67 $first = false;
68 }
69
70 ?></pre>
71 </div>
72 </div>
73 </div>
74
75 <div class="d4p-group d4p-group-extra d4p-group-important">
76 <h3><?php _e("IIS Server", "gd-security-headers"); ?></h3>
77 <div class="d4p-group-inner">
78 <p><?php _e("If you use IIS server, you can copy rules from here to add to the server 'Web.config' file.", "gd-security-headers"); ?></p>
79 <div class="gdsih-code-block">
80 <pre>&lt;system.webServer>
81 &lt;httpProtocol>
82 &lt;customHeaders><br/><?php
83
84 foreach ($list as $key => $value) {
85 $parts = explode(' ', $value, 2);
86
87 echo ' &lt;add name="'.$parts[0].'" value='.$parts[1].' /><br/>';
88 }
89
90 ?> &lt;/customHeaders>
91 &lt;httpProtocol>
92 &lt;system.webServer></pre>
93 </div>
94 </div>
95 </div>
96 </div>
97
98 <?php
99
100 include(GDSIH_PATH.'forms/shared/bottom.php');
101