Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nodemechanic's avatar

Heroku and Inertia links

I deployed my laravel inertia app to Heroku and all my links are HTTP and not HTTPS causing this error.

This request has been blocked; the content must be served over HTTPS.

Does anyone know the solution? Thanks!

0 likes
4 replies
martinbean's avatar
Level 80

@nodemechanic Sounds like you’ve not set up your trusted proxies properly. You’ll need to edit your TrustProxies middleware to have the following:

<?php

namespace App\Http\Middleware;

use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Request;

class TrustProxies extends Middleware
{
    protected $proxies = '*';
    protected $headers = Request::HEADER_X_FORWARDED_AWS_ELB;
}
nodemechanic's avatar

Thanks @martinbean that fixed a majority of the problem! The only thing I am running into now is on the login form the post route is responding with a 419 unknown status.

nodemechanic's avatar

Yeah, that seems to be it. Looks like I will need to get it from the meta tags and attach it to all inertia forms. Thanks again!

Please or to participate in this conversation.