Skip to content

Commit d5a79a0

Browse files
author
Charlie Somerville
committed
tweak readme
1 parent f568c9b commit d5a79a0

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

README.md

+11-6
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,23 @@ This is an optional dependency however, and Better Errors will work without it.
3333

3434
**NOTE:** It is *critical* you put better\_errors in the **development** section. **Do NOT run better_errors in production, or on Internet facing hosts.**
3535

36-
You will notice that the only machine that gets the Better Errors page is localhost, which means you get Ancient Errors if you are developing on a remote host (or a virtually remote host, such as a Vagrant box). Obviously, the REPL is not something you want to expose to the public, but there are also other pieces of sensitive information available in the backtrace (this giant info display comes at a price).
36+
You will notice that the only machine that gets the Better Errors page is localhost, which means you get the default error page if you are developing on a remote host (or a virtually remote host, such as a Vagrant box). Obviously, the REPL is not something you want to expose to the public, but there may also be other pieces of sensitive information available in the backtrace.
3737

3838
To poke selective holes in this security mechanism, you can add a line like this to your startup (for example, on Rails it would be `config/environments/development.rb`)
3939

40-
BetterErrors::Middleware.allow_ip! ENV['TRUSTED_IP'] if ENV['TRUSTED_IP']
40+
```ruby
41+
BetterErrors::Middleware.allow_ip! ENV['TRUSTED_IP'] if ENV['TRUSTED_IP']
42+
```
4143

42-
# Then run rails like:
43-
TRUSTED_IP=66.68.96.220 rails s
44+
Then run Rails like this:
45+
46+
```shell
47+
TRUSTED_IP=66.68.96.220 rails s
48+
```
4449

45-
Note that it is actually implemented as a `Set`, so you can add more than one.
50+
Note that the `allow_ip!` is actually backed by a `Set`, so you can add more than one IP address or subnet.
4651

47-
Tip: You can find your apparent IP by hitting the old error page's "Show env dump" and looking at "REMOTE_ADDR".
52+
**Tip:** You can find your apparent IP by hitting the old error page's "Show env dump" and looking at "REMOTE_ADDR".
4853

4954
## Usage
5055

0 commit comments

Comments
 (0)