Implement the correct settings of API response headers in front-end separation projects
In projects separated by front-end, back-end, the front-end (usually a single-page application based on frameworks such as Vue, React, Angular) and the back-end (usually an API service based on PHP, Node.js, Python, etc.) interact through the HTTP interface. To ensure that API responses can be handled correctly by the front-end, avoid cross-domain issues, ensure security and standardization, we must set up the HTTP response header correctly.
header