fix api_url
fix api_url handling in web views