Sha256: 6a2c58d9f45cc8b479470ff4fc16d48a2fb42deb6099d90ed8058eb0e1f253be

Contents?: true

Size: 1 KB

Versions: 13

Compression:

Stored size: 1 KB

Contents

# Compatibility with Other Middlewares

## Rack::Deflater

Some people ask rack-dev-mark does not work with `Rack::Delfater`. Those who ask this question typically insert `Rack::Deflater` by `config.middleware.use Rack::Deflater`. To deflate all the response including the error pages, you need to put the middleware before `ActionDispatch::ShowExceptions`. So the order of those 3 middlewares including `rack-dev-mark` looks like below.

```ruby
use Rack::Deflater
use Rack::DevMark::Middleware
use ActionDispatch::ShowExceptions
```

To make the order above, you can have the following settings for `Rack::Deflater`.

```ruby
module MyApp
  class Application < Rails::Application
    config.middleware.insert_before ActionDispatch::ShowExceptions, Rack::Deflater
  end
end
```

Of course, you can stick the `config.middleware.use Rack::Deflater` by the following settings for `rack-dev-mark`.

```ruby
module MyApp
  class Application < Rails::Application
    config.rack_dev_mark.insert_after Rack::Deflater
  end
end
```

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rack-dev-mark-0.8.0 COMPATIBILITY.md
rack-dev-mark-0.7.11 COMPATIBILITY.md
rack-dev-mark-0.7.10 COMPATIBILITY.md
rack-dev-mark-0.7.9 COMPATIBILITY.md
rack-dev-mark-0.7.8 COMPATIBILITY.md
rack-dev-mark-0.7.7 COMPATIBILITY.md
rack-dev-mark-0.7.6 COMPATIBILITY.md
rack-dev-mark-0.7.5 COMPATIBILITY.md
rack-dev-mark-0.7.4 COMPATIBILITY.md
rack-dev-mark-0.7.3 COMPATIBILITY.md
rack-dev-mark-0.7.1 COMPATIBILITY.md
rack-dev-mark-0.7.0 COMPATIBILITY.md
rack-dev-mark-0.6.4 COMPATIBILITY.md