Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
laravel-trusted-proxies
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
coding-all-night
laravel-trusted-proxies
Commits
7bf7e00a
Commit
7bf7e00a
authored
Feb 15, 2016
by
Chris Coley
Browse files
Options
Downloads
Patches
Plain Diff
Fixing some typos
parent
0cca30a6
Branches
master
Tags
v0.0.2
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/TrustedProxies.php
+2
-2
2 additions, 2 deletions
src/TrustedProxies.php
src/TrustedProxiesServiceProvider.php
+4
-1
4 additions, 1 deletion
src/TrustedProxiesServiceProvider.php
with
6 additions
and
3 deletions
src/TrustedProxies.php
+
2
−
2
View file @
7bf7e00a
...
...
@@ -19,7 +19,7 @@ class TrustedProxies
*
* @param \Illuminate\Contracts\Config\Repository $config
*/
public
function
__construct
ion
(
Repository
$config
)
{
public
function
__construct
(
Repository
$config
)
{
$this
->
config
=
$config
;
}
...
...
@@ -47,7 +47,7 @@ class TrustedProxies
* @param array $clientIpAddresses Array of client IP addresses.
* @return array An array of IP addresses of the trusted proxies.
*/
protected
function
getTrustedProxies
(
array
$clientIpAddress
=
[])
{
protected
function
getTrustedProxies
(
array
$clientIpAddress
es
=
[])
{
$trustedProxies
=
$this
->
config
->
get
(
'trustedproxies.proxies'
);
// Trust all proxies
...
...
This diff is collapsed.
Click to expand it.
src/TrustedProxiesServiceProvider.php
+
4
−
1
View file @
7bf7e00a
...
...
@@ -2,6 +2,7 @@
namespace
CodingAllNight\Proxy
;
use
Illuminate\Foundation\Application
;
use
Illuminate\Support\ServiceProvider
;
class
TrustedProxiesServiceProvider
extends
ServiceProvider
...
...
@@ -15,7 +16,9 @@ class TrustedProxiesServiceProvider extends ServiceProvider
$config
=
realpath
(
__DIR__
.
'/../config/trustedproxies.php'
);
// Publish the config to the application's config directory
if
(
$this
->
app
instanceof
Application
&&
$this
->
app
->
runningInConsole
())
{
$this
->
publishes
([
$config
=>
config_path
(
'trustedproxies.php'
)]);
}
// Merge the config
$this
->
mergeConfigFrom
(
$config
,
'trustedproxies'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment