Created
December 20, 2019 15:39
-
-
Save D7Torres/aabe8abad4e30a9aa9d66a0389322d2f to your computer and use it in GitHub Desktop.
Endpoint Refactor - Simplified getProtocol() v3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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