Skip to content
This repository has been archived by the owner on Mar 21, 2018. It is now read-only.

Ridley does not use Faraday middleware for following redirects #301

Open
trekr5 opened this issue Jan 23, 2015 · 2 comments
Open

Ridley does not use Faraday middleware for following redirects #301

trekr5 opened this issue Jan 23, 2015 · 2 comments

Comments

@trekr5
Copy link

trekr5 commented Jan 23, 2015

Hi,

I'm using the ridley gem to find a data-bag on a chef server and receive the following response:

Ridley::Errors::HTTPMovedPermanently:

<title>301 Moved Permanently</title>

301 Moved Permanently


nginx/1.4.4

After instantiating the Ridley client and creating a new object, this is how I try to find a databag named aws-admin:-

data = ridley.data_bag.find("aws-admin").

There is nothing in the response that I receive that gives me any information about a new location. (I have confirmed that this databag does exist on the chef server).

Can anyone give me some advice on how to solve this problem?

Thanks

@reset reset added the feature label Jan 23, 2015
@reset
Copy link
Collaborator

reset commented Jan 23, 2015

@trekr5 looks like we're not leveraging any middleware for following redirects. You can temporarily fix this in your NGINX config to avoid redirecting requests to Chef.

@cbreden
Copy link

cbreden commented Jan 28, 2015

I think I might be running into this same issue though the embedded ridley/faraday calls in a Vagrant run. I'm not very familiar with nginx configurations -- is there anything you'd recommend changing in the standard embedded nginx config that's shipping with Chef?

vagrant log: https://gist.github.com/cbreden/0e454c3e302bc76cf5b1
chef nginx configs: https://gist.github.com/cbreden/3a733934590bcee2c41e

@lamont-granquist lamont-granquist changed the title Attempting to find a data_bag on a chef server using ridley and getting a 301 error Ridley does not use Faraday middleware for following redirects Oct 19, 2016
@lamont-granquist lamont-granquist added this to the Accepted Minor milestone Oct 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants