Skip to content

How to use multiple handlers for the same route depending on accept header? #3026

Answered by mladedav
Grafcube asked this question in Q&A
Discussion options

You must be logged in to vote

This seems like another case similar to #1654

What you can do now is nesting the router under a prefix and then use middleware around the Router to rewrite the URL by prepending the same prefix based on your headers.

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
6 replies
@yanns
Comment options

yanns Nov 12, 2024
Collaborator

@Grafcube
Comment options

@yanns
Comment options

yanns Nov 12, 2024
Collaborator

@jplatte
Comment options

@Grafcube
Comment options

Comment options

You must be logged in to vote
1 reply
@Grafcube
Comment options

Answer selected by Grafcube
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants