Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Unexpected default vendor accept header. #25

Open
yoonsy opened this issue Aug 12, 2015 · 2 comments
Open

Unexpected default vendor accept header. #25

yoonsy opened this issue Aug 12, 2015 · 2 comments

Comments

@yoonsy
Copy link

yoonsy commented Aug 12, 2015

According to a middleware spec, ApiVersions::Middleware should add a default vendor accept to a nil Accept header.

But, in my opinion, it adds default vendor only if request path contains prefix path like /api. Otherwise, It adds default vendor when request path is / and Accept header is */*.

What do you think of this?

Thank you for sharing this project. 👍

@yoonsy
Copy link
Author

yoonsy commented Aug 13, 2015

I forked this project and changed the code like this.

I fixed the api prefix to /api, so I didn't open PR.

@rposborne
Copy link
Contributor

Agreed, adding the header to all can make controller tests suddenly think they are getting json. (when they have nothing to do with the API)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants