Skip to content

Allow response type to be conditional based on path #204

@petewalker

Description

@petewalker

In our application, we have a mix of JSON API endpoints and HTML pages.

All of our API endpoints are prefixed with the path /api.

It would be good if we could conditionally return a JSON response for our /api endpoints and a HTML response for all others.

Is it possible to make this configurable? In the interim as workaround, I guess we could subclass your middleware?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions