Skip to content

Instantly share code, notes, and snippets.

@fivethreeo
Last active July 31, 2020 14:13
Show Gist options
  • Save fivethreeo/947607499127199a91f4b3f695dca27d to your computer and use it in GitHub Desktop.
Save fivethreeo/947607499127199a91f4b3f695dca27d to your computer and use it in GitHub Desktop.
location ^~ /myapp/ {
proxy_pass http://0.0.0.0:3001/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
'use strict';
module.exports = {
modify(config, { target, dev }, webpack) {
const appConfig = config; // stay immutable here
if (target === 'web' && dev) {
appConfig.devServer.public = "razzle.syntapse.co.uk:80";
appConfig.devServer.proxy = {
context: () => true,
target: 'http://localhost:3000'
};
appConfig.devServer.index = '';
}
return appConfig;
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment