Skip to content

Commit

Permalink
Add section about canonical rack headers
Browse files Browse the repository at this point in the history
  • Loading branch information
schmijos authored Oct 1, 2024
1 parent 47e12f5 commit 02ff0e7
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,20 @@ RSpec.describe 'Multilanguage support' do
end
```

## HTTP Headers
## Simple Canonical headers

Add our [`rack-canonical-header` gem](https://github.com/renuo/rack-canonical-header)
to your `Gemfile` in production to automatically patch the HTTP header tag `Link`.

```rb
group :production do
gem 'rack-canonical-header'
end
```

This requires you to provide an env variable `CANONICAL_HOST` in production.

## Advanced headers for multi-language support.

The following sets `Content-Language` and `Link` headers (`canonical` and `hreflang`):

Expand Down

0 comments on commit 02ff0e7

Please sign in to comment.