9 months ago

Axios Mixed Content

Posted 9 months ago by king_eke

I'm trying to get a post request from my server to the client dashboard, but keep getting this response

Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ''. This request has been blocked; the content must be served over HTTPS.'/dashboard/delivery-data/', {
            headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
            'Accept': 'application/json'
          }).then(function (response) {

In my local environment it works fine, but in my heroku environment it doesn't, but works on the admin dashboard

the route

Route::post('/delivery-data', ['uses' => '[email protected]']);

the controller

$client = $this->client;

        $deliveries = DeliveryStatus::latest()->whereHas('delivery', function($q)use($client){
            $q->where('client_id', $client->id);
        })->select('status', 'created_at')->get()->groupBy(function ($date){
            return Carbon::parse($date->created_at)->format('Y');

        return response()->json($deliveries, 200);

Please sign in or create an account to participate in this conversation.