try to get resources from location origin to avoid No 'Access-Control-Allow-Origin'