search

Home  >  Q&A  >  body text

javascript - vue axios requests Douban data across domains, but the proxy service is also configured, and it is still cross-domain! Please solve

巴扎黑巴扎黑2778 days ago593

reply all(3)I'll reply

  • 大家讲道理

    大家讲道理2017-05-19 10:37:30

    Change the address in the ajax request to '/api/movie/in_theaters' or 'http://localhost:8880/api/mov...'

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-19 10:37:30

    With a proxy, you don’t need to bring the domain name when sending a request.
    Change to this:

    _this.axios.get('/api/movie/in_theater')

    reply
    0
  • PHP中文网

    PHP中文网2017-05-19 10:37:30

    The request address directly writes /api/movie/in_theaters, instead of the complete interface of Douban

    reply
    0
  • Cancelreply