aboutsummaryrefslogtreecommitdiff
path: root/_site/rewrites/assets.php
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-04 16:56:12 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-04 16:56:12 +0200
commit896fa7c96856142f844d958b049d5432f511641c (patch)
treed8bbbe327939ade9bd13276c6b4c6105adf95323 /_site/rewrites/assets.php
parent7df2fb3f5ee0ac5bd89e127c86ad0c2d6de126d1 (diff)
downloadunchainedtech-896fa7c96856142f844d958b049d5432f511641c.tar.gz
unchainedtech-896fa7c96856142f844d958b049d5432f511641c.tar.bz2
unchainedtech-896fa7c96856142f844d958b049d5432f511641c.zip
v2.0
Diffstat (limited to '_site/rewrites/assets.php')
-rw-r--r--_site/rewrites/assets.php48
1 files changed, 24 insertions, 24 deletions
diff --git a/_site/rewrites/assets.php b/_site/rewrites/assets.php
index bd2baac..8ee7a38 100644
--- a/_site/rewrites/assets.php
+++ b/_site/rewrites/assets.php
@@ -1,25 +1,25 @@
-<?php
-
-if (!isset($_GET['i'])) {
- die();
-}
-
-if (strpos($_GET['i'], ".") !== false && strpos($_GET['i'], "\\") !== false) {
- die();
-}
-
-if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/../_posts/assets/" . $_GET['i']) || !is_file($_SERVER['DOCUMENT_ROOT'] . "/../_posts/assets/" . $_GET['i'])) {
- die();
-}
-
-$file = $_SERVER['DOCUMENT_ROOT'] . "/../_posts/assets/" . $_GET['i'];
-
-header('Content-Type: ' . mime_content_type($file));
-header('Content-Transfer-Encoding: binary');
-header('Expires: 0');
-header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
-header('Pragma: public');
-ob_clean();
-flush();
-readfile($file);
+<?php
+
+if (!isset($_GET['i'])) {
+ die();
+}
+
+if (strpos($_GET['i'], ".") !== false && strpos($_GET['i'], "\\") !== false) {
+ die();
+}
+
+if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/../_posts/assets/" . $_GET['i']) || !is_file($_SERVER['DOCUMENT_ROOT'] . "/../_posts/assets/" . $_GET['i'])) {
+ die();
+}
+
+$file = $_SERVER['DOCUMENT_ROOT'] . "/../_posts/assets/" . $_GET['i'];
+
+header('Content-Type: ' . mime_content_type($file));
+header('Content-Transfer-Encoding: binary');
+header('Expires: 0');
+header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+header('Pragma: public');
+ob_clean();
+flush();
+readfile($file);
exit; \ No newline at end of file