This website works better with JavaScript.
Home
Explore
Help
Sign In
jyt94
/
closedSocialMastodon
forked from
closed-social/mastodon
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
0
Wiki
Activity
Browse Source
Fix error
closed-social-v3
Eugen
7 years ago
committed by
GitHub
parent
cea9fb31fe
commit
956da43e19
1 changed files
with
5 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+5
-1
config/initializers/trusted_proxies.rb
+ 5
- 1
config/initializers/trusted_proxies.rb
View File
@ -1,7 +1,11 @@
module
Rack
class
Request
def
trusted_proxy?
(
ip
)
Rails
.
application
.
config
.
action_dispatch
.
trusted_proxies
.
any?
{
|
proxy
|
proxy
===
ip
}
if
Rails
.
application
.
config
.
action_dispatch
.
trusted_proxies
.
nil?
super
else
Rails
.
application
.
config
.
action_dispatch
.
trusted_proxies
.
any?
{
|
proxy
|
proxy
===
ip
}
end
end
end
end
Write
Preview
Loading…
Cancel
Save