Skip to content

Commit

Permalink
integrated contenttype middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
sio4 committed Feb 14, 2023
1 parent 7f5b54a commit ed37849
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,15 @@ $ go get github.com/gobuffalo/middleware
```


## Middlewares
## contenttype

### csrf
`contenttype` middleware provides a feature that sets the fallback content type
(which is used when the client sent nothing) or overrides the client-specified
content type.
This middleware will be enabled by default in your app when you generate a new
API application with `buffalo new --api` command.

## csrf

`csrf` middleware provides
[CSRF](https://en.wikipedia.org/wiki/Cross-site_request_forgery)
Expand All @@ -39,7 +45,7 @@ This middleware will be enabled by default in your app when you generate a new
application scaffold with `buffalo new` command.


### forcessl
## forcessl

`forcessl` middleware provides a feature that automatically redirects requests
that is not use HTTPS.
Expand All @@ -48,7 +54,7 @@ application scaffold with `buffalo new` command.
It is configured to enforce the redirection in the `production` mode only. You
could customize it in `actions/app.go` if you need a different behavior.

### i18n
## i18n

`i18n` middleware provides internationalization support in your application:

Expand All @@ -59,7 +65,7 @@ could customize it in `actions/app.go` if you need a different behavior.
See <https://gobuffalo.io/documentation/guides/localization/> for further
information about Buffalo translation features and configuration.

### paramlogger
## paramlogger

`paramlogger` middleware provides the request parameter logging feature.
This middleware will be enabled by default in your app when you generate a new
Expand Down
2 changes: 1 addition & 1 deletion contenttype/content_type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/gobuffalo/buffalo"
"github.com/gobuffalo/buffalo/render"
"github.com/gobuffalo/httptest"
contenttype "github.com/gobuffalo/mw-contenttype"
"github.com/gobuffalo/middleware/contenttype"
"github.com/stretchr/testify/require"
)

Expand Down

0 comments on commit ed37849

Please sign in to comment.