Просмотр исходного кода

Wrong content type (text/html) was preventing the browser to accept the script as javascript

- Behavior enforced by nginx header X-Content-Type-Options: nosniff

Resolves issue #363
Robert Zollner 6 лет назад
Родитель
Сommit
65c94ebe89
2 измененных файлов с 6 добавлено и 1 удалено
  1. 1 0
      web/js/i18n.js.php
  2. 5 1
      web/templates/admin/panel.html

+ 1 - 0
web/js/i18n.js.php

@@ -1,4 +1,5 @@
 <?php
+header("Content-Type: text/javascript");
 session_start();
 
 require_once($_SERVER['DOCUMENT_ROOT'].'/inc/i18n.php');

+ 5 - 1
web/templates/admin/panel.html

@@ -25,7 +25,11 @@
 					<i class="fas fa-exchange-alt"></i>&nbsp;&nbsp;<b><?=humanize_usage_size($panel[$user]['U_BANDWIDTH'])?></b> <?=humanize_usage_measure($panel[$user]['U_BANDWIDTH'])?>
 				</span>
 			</div>
-			<div class="l-menu__item"><a alt="<?=__('Notifications')?>" class="l-profile__notifications <? if($panel[$user]['NOTIFICATIONS'] == 'yes') echo " updates"; ?>"><i class="fas fa-bell <?if($panel[$user]['NOTIFICATIONS'] == 'yes') echo " animated extended swing status-icon orange"; ?>"></i></a></div>
+			<div class="l-menu__item">
+				<a alt="<?=__('Notifications')?>" class="l-profile__notifications <? if($panel[$user]['NOTIFICATIONS'] == 'yes') echo " updates"; ?>">
+					<i class="fas fa-bell <?if($panel[$user]['NOTIFICATIONS'] == 'yes') echo " animated extended swing status-icon orange"; ?>"></i>
+				</a>
+			</div>
 			<div class="l-menu__item"><a href="https://docs.hestiacp.com/" alt="<?=__('Help')?>" class="l-profile__help" target="_blank"><i class="fas fa-question-circle"></i></a></div>
 			<div class="l-menu__item"><a href="/edit/user/?user=<?php echo $user; ?>" alt="<?=$user?>" class="l-profile__username"><i class="fas fa-user-circle"></i></a></div>
 			<div class="l-menu__item"><a href="/logout/" alt="<?=__('Log out')?>" class="l-profile__logout"><i class="fas fa-sign-out-alt"></i></a></div>