perafly.jsonc
The project's configuration file: build settings, redirects, rewrites, headers, cron jobs and first access.
On this page
The file
perafly.jsonc sits at the root of what you publish. It's JSON with comments. Perafly reads it when a version is finalized and turns it into the deployment's configuration; the file is published but never served. Framework detection and builds belong to the hosting provider; this file only overrides them.
perafly init writes the file with its $schema, so your editor can check it as you type. The file never holds the project's id: which project a folder publishes to is in .perafly/project.json.
Keys
redirects, rewrites and headers use the field names of Vercel's vercel.json and are passed through as written. Rules can't target /_files (storage) or /__perafly (the access gate); Perafly's own /_files/ rule comes before yours.
When the file is wrong
- An invalid
perafly.jsoncstops the version before it's deployed: finalize answersconfig_invalidanddetailnames the field and the reason. The CLI also checks the file before uploading. vercel.jsonandnow.jsonaren't accepted in a publish (config_file_not_allowed): move their rules here.