Skip to content

Commit ff174b5

Browse files
committed
removing proxy disabling
1 parent 1c66093 commit ff174b5

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/services/index.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,11 @@ function isBrowser(){
88
return typeof window !== 'undefined';
99
}
1010

11-
/* istanbul ignore next */
12-
function isHttps(){
13-
return typeof location !== 'undefined' && location.protocol === 'https:'
14-
}
15-
16-
/* istanbul ignore next */
17-
function shouldUseProxy(){
18-
return isBrowser() && !isHttps()
19-
}
20-
2111
/* istanbul ignore next */
2212
function injectProxy (Service) {
2313
return (cepWithLeftPad) => Service(cepWithLeftPad, PROXY_URL)
2414
}
2515

26-
export const CepAbertoService = shouldUseProxy() ? injectProxy(CepAberto) : CepAberto
27-
export const CorreiosService = shouldUseProxy() ? injectProxy(Correios) : Correios
16+
export const CepAbertoService = isBrowser() ? injectProxy(CepAberto) : CepAberto
17+
export const CorreiosService = isBrowser() ? injectProxy(Correios) : Correios
2818
export const ViaCepService = ViaCep

0 commit comments

Comments
 (0)