supermarket
supermarket copied to clipboard
Better handling of API redirects
We currently skip canonical redirection in Nginx if the user agent is "Faraday" (usually from Berkshelf) or "Ruby" (usually from Knife.)
This is a bit fragile and one of these solutions might work better:
- Don't do any redirection on the /api/* endpoints
- Don't attempt redirects for requests that are not HEAD or GET (because they shouldn't be followed anyway according to RFC 2616.)