From f684a62a41040854d3f9f1b681b19dde4d037e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=86=E3=82=AF=E3=83=8B=E3=82=AB=E3=83=AB=E8=AB=8F?= =?UTF-8?q?=E8=A8=AA=E5=AD=90?= Date: Fri, 9 Feb 2018 14:45:13 +0100 Subject: [PATCH] Trying? --- app/Http/Middleware/TrustProxies.php | 10 +++++----- resources/assets/js/bootstrap.js | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index ef1c00d..d5233b9 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -20,10 +20,10 @@ class TrustProxies extends Middleware * @var array */ protected $headers = [ - Request::HEADER_FORWARDED => 'FORWARDED', - Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR', - Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST', - Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT', - Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO', + // Request::HEADER_FORWARDED => 'FORWARDED', + // Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR', + // Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST', + // Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT', + // Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO', ]; } diff --git a/resources/assets/js/bootstrap.js b/resources/assets/js/bootstrap.js index 3a56c23..9ba31d6 100644 --- a/resources/assets/js/bootstrap.js +++ b/resources/assets/js/bootstrap.js @@ -19,9 +19,9 @@ try { * CSRF token as a header based on the value of the "XSRF" token cookie. */ -window.axios = require('axios'); +// window.axios = require('axios'); -window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; +// window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; /** * Next we will register the CSRF Token as a common header with Axios so that @@ -29,13 +29,13 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; * a simple convenience so we don't have to attach every token manually. */ -let token = document.head.querySelector('meta[name="csrf-token"]'); +// let token = document.head.querySelector('meta[name="csrf-token"]'); -if (token) { - window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; -} else { - console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); -} +// if (token) { + // window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; +// } else { + // console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); +// } /** * Echo exposes an expressive API for subscribing to channels and listening