Hi,
I want to proxy http://localhost:9000/images and http://localhost:9000/rest to https://remotehost/images and https://remotehost/rest but I get error 500 for both. What am I doing wrong? How to debug this?
Here is my config:
connect: {
options: {
port: 9000,
// Change this to '0.0.0.0' to access the server from outside.
hostname: 'localhost',
livereload: 35729
},
proxies: [
{
context: '/images',
host: remotehost,
port: 443,
https: true,
changeOrigin: true,
xforward: false,
rejectUnauthorized: false
}
],
livereload: {
options: {
open: true,
base: [
'.tmp',
'<%= yeoman.app %>'
],
middleware: function (connect, options) {
if (!Array.isArray(options.base)) {
options.base = [options.base];
}
// Setup the proxy
var middlewares = [require('grunt-connect-proxy/lib/utils').proxyRequest];
// Serve static files.
options.base.forEach(function(base) {
middlewares.push(connect.static(base));
});
// Make directory browse-able.
var directory = options.directory || options.base[options.base.length - 1];
middlewares.push(connect.directory(directory));
return middlewares;
}
}
},
I tried to debug this running grunt serve --debug bug I get no extra information about why I get this error.
Thank you!
Hi, I want to proxy
http://localhost:9000/images
andhttp://localhost:9000/rest
tohttps://remotehost/images
andhttps://remotehost/rest
but I get error 500 for both. What am I doing wrong? How to debug this? Here is my config:I tried to debug this running
grunt serve --debug
bug I get no extra information about why I get this error. Thank you!