mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-04 23:45:07 +00:00
chore(dev): fix fetching http env json (#5921)
This commit is contained in:
parent
0d7495b8ed
commit
6e4909557d
@ -1,12 +1,17 @@
|
||||
var fs = require('fs');
|
||||
var path = require('path')
|
||||
var http = require('http');
|
||||
var https = require('https');
|
||||
var urlModule = require('url');
|
||||
|
||||
var defaultEnvironmentJsonURL = 'http://localhost:8080/ui/console/assets/environment.json'
|
||||
var devEnvFile = path.join(__dirname, "src", "assets", "environment.json")
|
||||
var url = process.env["ENVIRONMENT_JSON_URL"] || defaultEnvironmentJsonURL;
|
||||
|
||||
https.get(url, function (res) {
|
||||
var protocol = urlModule.parse(url).protocol;
|
||||
var getter = protocol === 'https:' ? https.get : http.get;
|
||||
|
||||
getter(url, function (res) {
|
||||
var body = '';
|
||||
|
||||
res.on('data', function (chunk) {
|
||||
|
Loading…
Reference in New Issue
Block a user