Skip to content

Instantly share code, notes, and snippets.

@pablomujica
Created September 14, 2020 01:25
Show Gist options
  • Save pablomujica/967a598f7765cfc1ceea35241a10511f to your computer and use it in GitHub Desktop.
Save pablomujica/967a598f7765cfc1ceea35241a10511f to your computer and use it in GitHub Desktop.
Proxy the Azure Functions local instance in Vue to the API Path for Azure Static Sites
1. Create the file vue.config.js in the root of the project.
2. Add the following content:
``` javascript
module.exports = {
devServer: {
proxy: {
'/api': {
target: 'http://localhost:7071',
ws: true,
changeOrigin: true
}
}
}
}
```
3. Restart the local server: npm run serve.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment