gtalarico/flask-vuejs-template

Use devServer Proxy

gtalarico opened this issue · 1 comments

https://github.com/vuejs/vue-cli/blob/dev/docs/cli-service.md#configuring-proxy

Seems like this feature would simplify development server config and possibly aliminate the need for:

if not current_app.config['PRODUCTION']:
response.headers['Access-Control-Allow-Origin'] = '*'

and
const API_URL = IS_PRODUCTION ? '/api/' : 'http://localhost:5000/api/'