Binary Responses
To return binary responses, such as PDF downloads, from your Vapor application, your HTTP response should include theX-Vapor-Base64-Encode
header:
Lambda limits responses to 6MB. If you need to serve a larger file, consider returning a signed, temporary S3 URL that your user may use to download the file directly from S3.
Configuring OpenSSL
To use certain OpenSSL functions such as openssl_pkey_new, you must create anopenssl.cnf
configuration file and instruct Vapor to load it via the OPENSSL_CONF
environment variable. For example, this environment variable will instruct Vapor to load an openssl.cnf
file from the root of your project:
openssl.cnf
file is available below:
“After Response” Jobs
In typical Laravel applications, you may dispatch jobs that will be executed after the HTTP response is sent to the browser:Inertia SSR
Currently, Inertia server-side rendering (SSR) is not available on Vapor environments due to constraints of AWS Lambda. For applications requiring Inertia with SSR capabilities, we recommend:- Laravel Cloud - Our fully-managed Laravel application platform.
- Laravel Forge - Our VPS server management platform.