Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 29 lines (24 sloc) 0.729 kB
15cf62c @vrana New plugins: version-noverify, frames
authored
1 <?php
2
3e94e9d @vrana Support SameOrigin
authored
3 /** Allow using Adminer inside a frame (disables ClickJacking protection)
091a4d0 @vrana Link to documentation
authored
4 * @link http://www.adminer.org/plugins/#use
15cf62c @vrana New plugins: version-noverify, frames
authored
5 * @author Jakub Vrana, http://www.vrana.cz/
6 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8 */
9 class AdminerFrames {
7578342 @vrana Comment
authored
10 /** @access protected */
3e94e9d @vrana Support SameOrigin
authored
11 var $sameOrigin;
12
13 /**
14 * @param bool allow running from the same origin only
15 */
16 function AdminerFrames($sameOrigin = false) {
17 $this->sameOrigin = $sameOrigin;
18 }
15cf62c @vrana New plugins: version-noverify, frames
authored
19
20 function headers() {
3e94e9d @vrana Support SameOrigin
authored
21 if ($this->sameOrigin) {
22 header("X-Frame-Options: SameOrigin");
23 }
15cf62c @vrana New plugins: version-noverify, frames
authored
24 header("X-XSS-Protection: 0");
ad45a66 @vrana Adminer 3.3.0 compatibility (bug #3383184)
authored
25 return false;
15cf62c @vrana New plugins: version-noverify, frames
authored
26 }
27
28 }
Something went wrong with that request. Please try again.