cloudfoundry-community / node-cfenv

easy access to your Cloud Foundry application environment for node
Apache License 2.0
73 stars 20 forks source link

Incorrect app url returned for https protocol #18

Closed prachikhadke closed 8 years ago

prachikhadke commented 8 years ago

Running the following:

var cfenv = require("cfenv")
var appEnv = cfenv.getAppEnv({protocol: "https"});

get url: "https//localhost:6001" in the returned appEnv instead of url: "https://localhost:6001"

pmuellr commented 8 years ago

That is the correct behavior.

From the README, last bit bolded for emphasis:

  • protocol - protocol used in the generated URLs

This value is to override the default protocol used when generating the URLs in the returned object. It should be the same format as node's url protocol property. That is, it should end with a : character.