Прокси не работает, если мой бэкэнд размещен на heroku, а веб-интерфейс - на лазурном - PullRequest
0 голосов
/ 22 июня 2019

URL прокси не работает в файле package.json.Мое приложение create-response-app размещено в Azure, а backend nodejs - в Heroku.Я изменил URL-адрес прокси-сервера с помощью secure: false, но он все еще не работает.

Мой файл package.json:

{
  "name": "yoke",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "axios": "^0.18.0",
    "bootstrap": "^4.3.1",
    "config": "^3.1.0",
    "history": "^4.9.0",
    "jquery": "^3.4.1",
    "jwt-decode": "^2.2.0",
    "moment": "^2.24.0",
    "popper.js": "^1.15.0",
    "react": "^16.8.6",
    "react-bootstrap": "^1.0.0-beta.8",
    "react-dom": "^16.8.6",
    "react-router-dom": "^5.0.0",
    "react-scripts": "3.0.1"
  },
  "proxy": {
    "target": "https://fierce-reef-74150.herokuapp.com",
    "secure": false,
    "headers": {
      "host": "https://fierce-reef-74150.herokuapp.com"
    },
    "cookieDomainRewrite": ""
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

Какое решение?

...