js checks and cors enabling for heroku