7Z
, APK
, AVI
, AVIF
, BIN
, BMP
, BZ2
, CLASS
, CSS
, CSV
, DMG
, DOC
, DOCX
, EJS
, EOT
, EPS
, EXE
, FLAC
, GIF
, GZ
, ICO
, ISO
, JAR
, JPEG
, JPG
, JS
, MID
, MIDI
, MKV
, MP3
, MP4
, OGG
, OTF
, PDF
, PICT
, PLS
, PNG
, PPT
, PPTX
, PS
, RAR
, SVG
, SVGZ
, SWF
, TAR
, TIF
, TIFF
, TTF
, WEBM
, WEBP
, WOFF
, WOFF2
, XLS
, XLSX
, ZIP
, ZST
When a Cache-Control
directive or Expires
header is not explicitly set, Laravel Cloud will use the HTTP status code to determine the cache duration.
HTTP Status Code | Default TTL |
---|---|
200, 206, 301 | 120m |
302, 303 | 20m |
404, 410 | 3m |
Cache-Control
and Expires
headers in your application code. Laravel Cloud will respect these headers and cache your assets according to the rules you set.
Certain headers set by your application can prevent Laravel Cloud from caching a response.
Set-Cookie
header will prevent caching.Authorization
header will prevent caching (unless a must-revalidate
, public
, or s-maxage
header is also present).X-Frame-Options: DENY
header. This prevents certain types of attacks that can occur if an application is loaded from an iframe. If your application has a use case for allowing iframes, you can change the header value to SAMEORIGIN
or you can unset it entirely by clicking “Edge network” from the environment’s canvas.
X-Content-Type-Options: nosniff
header. This prevents browsers from interpreting files as a different MIME type than what is specified in the Content-Type
header. This is a security measure to prevent attacks based on MIME-type confusion.
If your application has a use case for allowing browsers to interpret files as a different MIME type, you can unset the header entirely by clicking “Edge network” from the environment’s canvas and selecting “None”.
X-Content-Type-Options
header, your application can override the default and set a nosniff
value at the route level. However, the the opposite is not true: if you select the nosniff
option, your application cannot unset the value.Strict-Transport-Security
header with a max-age of 31536000 seconds (1 year - customizable). This header is used to enforce secure (HTTPS) connections to the server.
You can also optionally enable the includeSubDomains
and preload
directives. The includeSubDomains
directive applies the HSTS policy to all subdomains of your application, while the preload
directive allows your domain to be included in browsers’ HSTS preload lists. This means that browsers will automatically enforce HTTPS for your domain and its subdomains, even before the first request is made. Make sure you understand the implications of these directives before enabling them, as it can be difficult to remove once set due to browser caching.
X-Robots-Tag: noindex, nofollow
header is automatically set on all *.laravel.cloud
domains so that they are not indexed by search engines. To remove this header, you should configure a custom domain for your application. The header will not be set for custom domains.