Skip to content

Instantly share code, notes, and snippets.

@anibalardid
Created January 14, 2020 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anibalardid/405514c97fc3b453d291c8fc1386d99c to your computer and use it in GitHub Desktop.
Save anibalardid/405514c97fc3b453d291c8fc1386d99c to your computer and use it in GitHub Desktop.
angularjs webpack proxy configuration
devServer: {
historyApiFallback: true,
watchOptions: { aggregateTimeout: 300, poll: 1000 },
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
},
proxy: {
'/doc-html/*': {
target: 'http://pruebas.local',
secure: false,
changeOrigin: true,
pathRewrite: {'^/doc-html' : ''}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment