Skip to content

Instantly share code, notes, and snippets.

@D7Torres
Created December 20, 2019 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save D7Torres/aabe8abad4e30a9aa9d66a0389322d2f to your computer and use it in GitHub Desktop.
Save D7Torres/aabe8abad4e30a9aa9d66a0389322d2f to your computer and use it in GitHub Desktop.
Endpoint Refactor - Simplified getProtocol() v3
const getProtocol = (service, isServerSide, environment) => {
...
if (service === 'webclient' ||
(service !== 'webclient' && environment !== 'local')) {
return 'https'
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment