Commit 32148e8a5179907c9be98616129597ac5ebbabd4

Authored by Leonardo Merlin
1 parent 9a788d37

Check if is production location and config api

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
js/main.js
... ... @@ -22,8 +22,8 @@ define(['jquery', 'handlebars', 'fastclick', 'proposal_app', 'handlebars_helpers
22 22  
23 23 var lastHash = window.location.hash;
24 24  
25   - // var host = 'http://login.dialoga.gov.br';
26   - var host = 'http://hom.login.dialoga.serpro';
  25 + var isProduction = /^http:\/\/dialoga\.gov\.br\//.test(window.location.href);
  26 + var host = isProduction ? 'http://login.dialoga.gov.br' : 'http://hom.login.dialoga.serpro';
27 27 var serpro_captcha_clienteId = 'fdbcdc7a0b754ee7ae9d865fda740f17';
28 28 var dialoga_community = 19195;
29 29 var proposal_discussion = '103358'; //participa
... ...