Enabling Inertia.js SSR

Overview

This documentation page provides instructions on enabling Server-Side Rendering (SSR) for Inertia.js applications using Harbor. SSR enhances the performance and SEO capabilities of your Inertia.js applications by rendering pages on the server-side before sending them to the client.

Add Environment Variable For Provision

In your preview provisioning GitHub workflow file (/.github/workflows/preview-provision.yml), add the following environment variable:

env:
 INERTIA_SSR_ENABLED: true

This environment variable instructs Harbor to enable SSR for your Inertia.js application.

Update Teardown Workflow

Ensure that when tearing down the preview environment, you include the INERTIA_SSR_ENABLED=true environment variable in your teardown workflow.