Giter VIP home page Giter VIP logo

Comments (5)

curtisbelt avatar curtisbelt commented on May 23, 2024 1

@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']
},

from axios-module.

pi0 avatar pi0 commented on May 23, 2024

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

from axios-module.

homerjam avatar homerjam commented on May 23, 2024

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

from axios-module.

tiagomatosweb avatar tiagomatosweb commented on May 23, 2024

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?

from axios-module.

jucau avatar jucau commented on May 23, 2024

Hello all,

maybe it will help someone, I had same kind of trouble with Cloudfront, getting a 403 when using a cookie based auth API with proxyHeaders: true.
Solution was to ignore also Cloudfront headers in proxyHeadersIgnore : ['host', 'accept', 'cf-ray', 'cf-connecting-ip', 'content-length', 'via', 'user-agent', 'cloudfront-forwarded-proto', 'cloudfront-is-desktop-viewer', 'cloudfront-is-mobile-viewer', 'cloudfront-is-smarttv-viewer', 'cloudfront-is-tablet-viewer', 'cloudfront-viewer-country', 'x-amz-cf-id', 'x-amzn-trace-id', 'x-forwarded-for', 'x-apigateway-event', 'x-apigateway-context'].
Not sure all the above headers are necessary to ignore to get it work, but in my case I didn't need them and it solved my issue.

from axios-module.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.