Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix proxy options #16163

Merged
merged 3 commits into from
Feb 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dashboard/gulp/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ patterns.forEach(function(pattern) {
proxyOptions.route = '/api';
}
proxyOptions.preserveHost = false;
proxyOptions.rejectUnauthorized = false;
proxyOptions.secure = false;
proxies.push(proxy(proxyOptions));

});
Expand Down
10 changes: 8 additions & 2 deletions dashboard/gulp/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*******************************************************************************/

'use strict';

var minimist = require('minimist');
var path = require('path');
var gulp = require('gulp');
var conf = require('./conf');
Expand Down Expand Up @@ -39,6 +39,11 @@ function browserSyncInit(baseDir, browser) {
routes: routes
};

var options = minimist(process.argv.slice(2), {
string: 'server',
default: { port: 3000 }
});

/*
* You can add a proxy to your backend by uncommenting the line below.
* You just have to configure a context which will we redirected and the target url.
Expand All @@ -51,7 +56,8 @@ function browserSyncInit(baseDir, browser) {
browserSync.instance = browserSync.init({
startPath: '/',
server: server,
browser: browser
browser: browser,
port: options.port
});
}

Expand Down
6 changes: 1 addition & 5 deletions dashboard/src/app/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,7 @@ md-option:hover
min-width 320px
overflow hidden
div#main-content
height 100%

@-moz-document url-prefix()
#main-content
max-height calc(100vh - 30px)
max-height calc(100vh - 30px)

.progress-line
position relative
Expand Down