These are chat archives for ushahidi/Community

29th
Jan 2019
Chyril
@spfire
Jan 29 03:03

I have the same problem like this guy here https://forums.ushahidi.com/t/cant-connect-to-ushahidi-installation-from-android-app/4356

I already tried the solution mentioned (put the config.json in platform/httpdocs), but still don't work. I'm using Xampp apache btw, so I put the CORS header on httpd.conf (inside the "<virtualhost *:80>). I already did it with the .httaccess but can't load the website, only if in the httpd.conf from the apache that able to run in website but not on android. I wonder where did I go wrong.

I'm running on api.iresponse.com:8081

Chyril
@spfire
Jan 29 03:12

my config.json is:
{
client_id: "ushahidiui",
client_secret: "35e7f0bca957836d05ca0492211b0ac707671261",
backend_url: http://api.iresponse.com",
google_analytics_id: "",
intercom_app_id: "",
mapbox_api_key: "",
raven_url: ""
}

the code added in my httpd.conf is:

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot "C:/xampp/htdocs/iresponse/platform"
ServerName api.iresponse.com
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET, POST, OPTIONS"
Header set Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range"
Header set Access-Control-Expose-Headerss "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range"

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

<Directory "C:/xampp/htdocs">
AllowOverride all
</Directory>
</VirtualHost>