After the create-react-app project is packaged, the cross-domain json cannot be recognized by the ssm backend.

my project create-react-app serves as the foreground, ssm serves as the background, and the foreground json is passed to the background through cross-domain means.
the setting of the proxy agent in package.json

"proxy": {
"/api/php": {
  "target": "http://localhost:8080/shbaokangsoft-1.0.0-SNAPSHOT",
  "ws": true,
  "changeOrigin": true,
  "pathRewrite": {
    "^/api/php": ""
  }
}

},
the foreground is not packed, and there is no problem when accessing the background.
the foreground is packaged and deployed using the serve-s command. As a result, the cross-domain proxy settings no longer seem to work, Json is no longer recognized, and whether the
is not comprehensive enough (whether the packages are all packaged with npm run build), or the cross-domain settings after packaging are not set as above.


proxy is only valid in development mode, and the production environment does not take effect after build


the path "/ api/php" cannot be replaced with "http://localhost:8080/shbaokangsoft-1.0.0-SNAPSHOT"" after packaging, but the agent still works. Just write the path prefix http://localhost:8080/shbaokangsoft-1.0.0-SNAPSHOT directly in axios.post ().

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b228f0-2b62f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b228f0-2b62f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?