diff --git a/README.md b/README.md index caa7f8f..4dd52f6 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Features - Site paths starting with `.git-pages/...` are reserved. - The `.git-pages/manifest.json` path returns a [ProtoJSON](https://protobuf.dev/programming-guides/json/) representation of the deployed site manifest. It enumerates site structure, redirect rules, and errors that were not severe enough to abort publishing. * In response to a `PUT` or `POST` request, the server retrieves updates a site with new content. The URL of the request must be the root URL of the site that is being published. - - If the `PUT` method receives an `application/x-www-form-urlencoded` body, it contains a repository URL to be shallowly cloned. The `X-Pages-Branch` header contains the branch to be checked out; the `pages` branch is used if the header is absent. + - If the `PUT` method receives an `application/x-www-form-urlencoded` body, it contains a repository URL to be shallowly cloned. The `Branch` header contains the branch to be checked out; the `pages` branch is used if the header is absent. - If the `PUT` method receives an `application/x-tar`, `application/x-tar+gzip`, `application/x-tar+zstd`, or `application/zip` body, it contains an archive to be extracted. - The `POST` method requires an `application/json` body containing a Forgejo/Gitea/Gogs/GitHub webhook event payload. Requests where the `ref` key contains anything other than `refs/heads/pages` are ignored, and only the `pages` branch is used. The `repository.clone_url` key contains a repository URL to be shallowly cloned. - If the received contents is empty, performs the same action as `DELETE`. diff --git a/src/pages.go b/src/pages.go index c5744ff..08ff4c7 100644 --- a/src/pages.go +++ b/src/pages.go @@ -365,7 +365,7 @@ func putPage(w http.ResponseWriter, r *http.Request) error { } branch := "pages" - if customBranch := r.Header.Get("X-Pages-Branch"); customBranch != "" { + if customBranch := r.Header.Get("Branch"); customBranch != "" { branch = customBranch } if err := AuthorizeBranch(branch, auth); err != nil {