supermarket icon indicating copy to clipboard operation
supermarket copied to clipboard

Better handling of API redirects

Open smith opened this issue 9 years ago • 0 comments

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.)

smith avatar Dec 05 '14 19:12 smith