Skip to content

HTTPS clone URL

Subversion checkout URL

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