1
0
mirror of https://github.com/typemill/typemill.git synced 2025-07-30 19:00:32 +02:00

Fixed proxy detection and checked for empty ip settings

This commit is contained in:
trendschau
2020-10-13 23:01:43 +02:00
parent 0a9ce336de
commit c368c01433
7 changed files with 44 additions and 44 deletions

View File

@@ -82,7 +82,7 @@ class Settings
'editor' => 'visual',
'formats' => ['markdown', 'headline', 'ulist', 'olist', 'table', 'quote', 'notice', 'image', 'video', 'file', 'toc', 'hr', 'definition', 'code'],
'contentFolder' => 'content',
'version' => '1.3.8',
'version' => '1.4.0',
'setup' => true,
'welcome' => true,
'images' => ['live' => ['width' => 820], 'thumbs' => ['width' => 250, 'height' => 150]],

View File

@@ -17,8 +17,8 @@
<link rel="apple-touch-icon" sizes="180x180" href="{{ base_url }}/system/author/img/favicon-180.png" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/tachyons.min.css?20200716" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20200716" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/tachyons.min.css?20201012" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20201012" />
{{ assets.renderCSS() }}
@@ -41,16 +41,16 @@
<footer></footer>
</div>
<!-- <script src="{{ base_url }}/system/author/js/color-picker.min.js?20200505"></script> -->
<script src="{{ base_url }}/system/author/js/axios.min.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/axios.min.js?20201012"></script>
<script>
const myaxios = axios.create();
myaxios.defaults.baseURL = "{{ base_url }}";
</script>
<script src="{{ base_url }}/system/author/js/autosize.min.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vue.min.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vue-shared.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/author.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/typemillutils.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/autosize.min.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/vue.min.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/vue-shared.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/author.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/typemillutils.js?20201012"></script>
<script>
typemillUtilities.start()
</script>

View File

@@ -18,7 +18,7 @@
<link rel="apple-touch-icon" sizes="180x180" href="{{ base_url }}/system/author/img/favicon-180.png" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20200716" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20201012" />
{{ assets.renderCSS() }}
@@ -32,6 +32,6 @@
{% block content %}{% endblock %}
</div>
<script src="{{ base_url }}/system/author/js/auth.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/auth.js?20201012"></script>
</body>
</html>

View File

@@ -17,7 +17,7 @@
<link rel="apple-touch-icon" sizes="180x180" href="{{ base_url }}/system/author/img/favicon-180.png" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20200716" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20201012" />
</head>
<body>

View File

@@ -18,7 +18,7 @@
<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/tachyons.min.css" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20200716" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20201012" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/color-picker.min.css" />
{{ assets.renderCSS() }}
@@ -46,28 +46,28 @@
const myaxios = axios.create();
myaxios.defaults.baseURL = "{{ base_url }}";
</script>
<script src="{{ base_url }}/system/author/js/typemillutils.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vue.min.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/autosize.min.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/author.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vue-publishcontroller.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vue-blox-config.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/typemillutils.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/vue.min.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/autosize.min.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/author.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/vue-publishcontroller.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/vue-blox-config.js?20201012"></script>
<script>
let formatConfig = {{ settings.formats|json_encode() }};
let language = {{ settings.language|json_encode() }};
let labels = {{ translations|json_encode() }};
let labels = {{ translations|json_encode() }};
let navigation = {{ navigation|json_encode() }};
</script>
{{ assets.renderEditorJS() }}
<script src="{{ base_url }}/system/author/js/vue-blox.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vue-posts.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/sortable.min.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vuedraggable.umd.min.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vue-navi.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vue-shared.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vue-meta.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vue-blox.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/vue-posts.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/sortable.min.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/vuedraggable.umd.min.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/vue-navi.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/vue-shared.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/vue-meta.js?20201012"></script>
{{ assets.renderJS() }}

View File

@@ -17,7 +17,7 @@
<link rel="apple-touch-icon" sizes="180x180" href="{{ base_url }}/system/author/img/favicon-180.png" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20200716" />
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20201012" />
{{ assets.renderCSS() }}
@@ -39,16 +39,16 @@
</article>
<footer></footer>
</div>
<script src="{{ base_url }}/system/author/js/axios.min.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/axios.min.js?20201012"></script>
<script>
const myaxios = axios.create();
myaxios.defaults.baseURL = "{{ base_url }}";
</script>
<script src="{{ base_url }}/system/author/js/vue.min.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/autosize.min.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/sortable.min.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vuedraggable.umd.min.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/author.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vue.min.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/autosize.min.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/sortable.min.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/vuedraggable.umd.min.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/author.js?20201012"></script>
<script>
let language = {{ settings.language|json_encode() }};
@@ -58,10 +58,10 @@
{{ assets.renderEditorJS() }}
<script src="{{ base_url }}/system/author/js/vue-publishcontroller.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vue-editor.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vue-meta.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vue-navi.js?20200716"></script>
<script src="{{ base_url }}/system/author/js/vue-publishcontroller.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/vue-editor.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/vue-meta.js?20201012"></script>
<script src="{{ base_url }}/system/author/js/vue-navi.js?20201012"></script>
{{ assets.renderJS() }}

View File

@@ -48,12 +48,6 @@ $app = new \Slim\App($settings);
$container = $app->getContainer();
if(isset($settings['settings']['proxy']) && $settings['settings']['proxy'])
{
$trustedProxies = isset($settings['settings']['trustedproxies']) ? explode(",", $settings['settings']['trustedproxies']) : [];
$app->add(new RKA\Middleware\ProxyDetection($trustedProxies));
}
/************************
* LOAD & UPDATE PLUGINS *
************************/
@@ -318,6 +312,12 @@ if($container['flash'])
$app->add($container->get('csrf'));
}
if(isset($settings['settings']['proxy']) && $settings['settings']['proxy'])
{
$trustedProxies = ( isset($settings['settings']['trustedproxies']) && !empty($settings['settings']['trustedproxies']) ) ? explode(",", $settings['settings']['trustedproxies']) : [];
$app->add(new RKA\Middleware\ProxyDetection($trustedProxies));
}
/************************
* ADD ROUTES *
************************/