upgrade all urls to https

This commit is contained in:
Matt Walsh 2021-09-29 15:34:24 -05:00
parent 6349166dbe
commit fecbfaaf10
3 changed files with 906 additions and 659 deletions

View file

@ -73,7 +73,8 @@ const htmlSources = [
'views/*.ejs', 'views/*.ejs',
]; ];
gulp.task('compress_html', () => { gulp.task('compress_html', () => {
const { version } = JSON.parse(fs.readFileSync('./package.json')); // eslint-disable-next-line global-require
const { version } = require('../package.json');
return gulp.src(htmlSources) return gulp.src(htmlSources)
.pipe(ejs({ .pipe(ejs({
production: version, production: version,

1548
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -256,6 +256,8 @@ const utils = (() => {
let corsUrl = _url; let corsUrl = _url;
if (params.cors === true) corsUrl = rewriteUrl(_url); if (params.cors === true) corsUrl = rewriteUrl(_url);
const url = new URL(corsUrl); const url = new URL(corsUrl);
// force url to secure
url.protocol = 'https:';
// add parameters if necessary // add parameters if necessary
if (params.data) { if (params.data) {
Object.keys(params.data).forEach((key) => { Object.keys(params.data).forEach((key) => {