Commit 8e10e5d9 authored by Simon Pastor's avatar Simon Pastor
Browse files

new MEEP_PUBLIC_URL

parent 1c7ab162
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -116,12 +116,16 @@ func Init() (err error) {
	}
	log.Info("MEEP_SANDBOX_NAME: ", sandboxName)

	// Retrieve Host URL from environment variable
	// hostUrl is the url of the node serving the resourceURL
	// Retrieve public url address where service is reachable, if not present, use Host URL environment variable
	hostUrl, err = url.Parse(strings.TrimSpace(os.Getenv("MEEP_PUBLIC_URL")))
	if err != nil || hostUrl == nil || hostUrl.String() == "" {
		hostUrl, err = url.Parse(strings.TrimSpace(os.Getenv("MEEP_HOST_URL")))
		if err != nil {
			hostUrl = new(url.URL)
		}
	log.Info("MEEP_HOST_URL: ", hostUrl)
	}
	log.Info("resource URL: ", hostUrl)

	// Set base path
	basePath = "/" + sandboxName + LocServBasePath
+9 −5
Original line number Diff line number Diff line
@@ -100,12 +100,16 @@ func Init() (err error) {
	}
	log.Info("MEEP_SANDBOX_NAME: ", sandboxName)

	// Retrieve Root URL from environment variable
	// hostUrl is the url of the node serving the resourceURL
	// Retrieve public url address where service is reachable, if not present, use Host URL environment variable
	hostUrl, err = url.Parse(strings.TrimSpace(os.Getenv("MEEP_PUBLIC_URL")))
	if err != nil || hostUrl == nil || hostUrl.String() == "" {
		hostUrl, err = url.Parse(strings.TrimSpace(os.Getenv("MEEP_HOST_URL")))
		if err != nil {
			hostUrl = new(url.URL)
		}
	log.Info("MEEP_HOST_URL: ", hostUrl)
	}
	log.Info("resource URL: ", hostUrl)

	// Set base path
	basePath = "/" + sandboxName + metricsBasePath
+9 −5
Original line number Diff line number Diff line
@@ -103,12 +103,16 @@ func Init() (err error) {
	}
	log.Info("MEEP_SANDBOX_NAME: ", sandboxName)

	// Retrieve Host URL from environment variable
	// hostUrl is the url of the node serving the resourceURL
	// Retrieve public url address where service is reachable, if not present, use Host URL environment variable
	hostUrl, err = url.Parse(strings.TrimSpace(os.Getenv("MEEP_PUBLIC_URL")))
	if err != nil || hostUrl == nil || hostUrl.String() == "" {
		hostUrl, err = url.Parse(strings.TrimSpace(os.Getenv("MEEP_HOST_URL")))
		if err != nil {
			hostUrl = new(url.URL)
		}
	log.Info("MEEP_HOST_URL: ", hostUrl)
	}
	log.Info("resource URL: ", hostUrl)

	// Set base path
	basePath = "/" + sandboxName + rnisBasePath