Last active
May 12, 2022 12:23
-
-
Save yohangz/f4f6d4ab7f6d5d648574c07c3925c454 to your computer and use it in GitHub Desktop.
Angular CLI proxy config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const PROXY_CONFIG = { | |
| "**": { | |
| "target": "http://localhost:9000", | |
| "secure": false, | |
| "bypass": function (req) { | |
| if (req && req.headers && req.headers.accept && req.headers.accept.indexOf("html") !== -1) { | |
| console.log("Skipping proxy for browser request."); | |
| return "/index.html"; | |
| } | |
| } | |
| } | |
| }; | |
| module.exports = PROXY_CONFIG; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment