Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should proxyHeaders and credentials be true by default? #20

Closed
homerjam opened this Issue Sep 6, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@homerjam
Copy link

homerjam commented Sep 6, 2017

Just questioning whether these two useful features should be true by default - I found they caused problems with my setup. As a noob or someone switching from the regular axios module they introduce implicit complexity which can take a while to debug (vs. time saved from the benefits).

At lease a note regarding proxyHeaders:

If directing requests at a url protected by CloudFlare's CDN you should set this to false to prevent CloudFlare from mistakenly detecting a reverse proxy loop and returning a 403 error.

This question is available on Nuxt.js community (#c19)

pi0 added a commit that referenced this issue Sep 6, 2017

@pi0

This comment has been minimized.

Copy link
Member

pi0 commented Sep 6, 2017

Thanks. I've added the note. Actually, it depends on the use case but i think should be enabled by default to make it having a universal behavior. If you know some unwanted headers that CF adds that makes problems, just open a PR or ping me :)

@pi0 pi0 closed this Sep 6, 2017

@homerjam

This comment has been minimized.

Copy link
Author

homerjam commented Sep 7, 2017

Thanks. I think it's cf-ray header as described here, I'll check when I can (assuming I can use an interceptor to remove it).

@CurtisBelt

This comment has been minimized.

Copy link

CurtisBelt commented Apr 28, 2018

@pi0

If you know some unwanted headers that CF adds that makes problems, just open a PR or ping me

I believe I have that answer for you. To avoid Error 1000: DNS points to prohibited IP that @homerjam is referencing, I used proxyHeadersIgnore to remove the headers cf-ray and cf-connecting-ip.

nuxt.config.js

modules: [
  '@nuxtjs/axios'
],
axios: {
  proxyHeadersIgnore: ['host', 'accept', 'cf-ray', 'cf-connecting-ip']
},
@tiagomatosweb

This comment has been minimized.

Copy link

tiagomatosweb commented Oct 23, 2018

Hi all,
I'm getting the same issue. I've tried proxyHeaders = true which is true by default and I also have tried proxyHeadersIgnore: ['host', 'accept', 'cf-ray', 'cf-connecting-ip'] and did not work. I'm getting the Error 1000: DNS points to prohibited IP.

Any idea?

lefuturiste added a commit to lefuturiste/axios-module that referenced this issue Nov 1, 2018

pi0 added a commit that referenced this issue Nov 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.