# space.highport.sites.defs

> Published by [lexicons.highport.space](https://lexicon.garden/identity/did:plc:ciygg5hma4q7ah2kxaszkyob)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ciygg5hma4q7ah2kxaszkyob/space.highport.sites.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ciygg5hma4q7ah2kxaszkyob/space.highport.sites.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ciygg5hma4q7ah2kxaszkyob/space.highport.sites.defs/examples)

## Definitions

### `space.highport.sites.defs#access`

**Type**: `object`

Which parts of a site require a signed-in reader, and which readers qualify. Absent means nothing is gated and the owner budget decides every path, which suits most sites. This is content policy, not billing: it lives in the record, so it moves with the site and anyone can read it.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `audience` | `union` | No | Who the requireAuth paths are for. Absent means any signed-in reader. Only meaningful alongside requireAuth. The union is closed so that a host which does not recognize an audience rejects the record instead of opening the gate to everyone. |
| `requireAuth` | `array` | No | Path prefixes that always require a signed-in reader and always bill that reader, whatever the owner budget says. Matched against the normalized request path, so a prefix covers everything under it. "/" gates the whole site, the same as an owner budget of zero. |

### `space.highport.sites.defs#manifest`

**Type**: `object`

A bundle of resources keyed by path, using bard's camelCase subset of a MASL bundle-mode document. It is a site's inline source or a tile's content.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | No | Bundle name. Required for tile content, optional for an inline site source. |
| `resources` | `unknown` | Yes | Map of absolute request path (starting with '/') to space.highport.sites.defs#resource, since Lexicon has no map type. Tile content must have a '/' entry, and sites should. |

### `space.highport.sites.defs#redirect`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `to` | `string` | Yes | Destination path. Must be an absolute path that exists as a manifest key on this site. |
| `from` | `string` | Yes | The request path to match, optionally with a query string. Must match exactly. |
| `status` | `integer` | No | Redirect status. Defaults to 302. |

### `space.highport.sites.defs#resource`

**Type**: `object`

One addressable resource in a manifest.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `src` | `blob` | Yes | The blob holding this resource's bytes. |
| `status` | `integer` | No | Response status. Defaults to 200 for manifest entries and 404 for the notFound resource. |
| `contentType` | `string` | No | Content type to serve instead of the blob's mimeType. |
| `contentEncoding` | `string` | No | The encoding the stored blob already has. The origin serves it unchanged, with a matching Content-Encoding header. |

### `space.highport.sites.defs#wellKnown`

**Type**: `object`

Controls the responses bard generates under /.well-known/. Both flags default to true and exist only to turn things off. standardSitePublication is absent unless the publisher sets it.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `rasl` | `boolean` | No | Serve GET /.well-known/rasl/{cid} for every CID this site references. Default true. |
| `atproto` | `boolean` | No | Serve GET /.well-known/atproto-did with the site's owning DID. Default true. |
| `standardSitePublication` | `string` (at-uri) | No | Serve GET /.well-known/site.standard.publication with this AT-URI. It must name a site.standard.publication record in the site owner's repository whose url host is this domain, or the site record is rejected at indexing. While set, a manifest entry at that path is rejected. |

### `space.highport.sites.defs#spaceMembers`

**Type**: `object`

The members of the space this site lives in, as the space's host reports them. Only valid on a site served from a space, and rejected (not ignored) anywhere else. The record lists no members; the space's host is asked.

| Property | Type | Required | Description |
|----------|------|----------|-------------|

## Raw Schema

```json
{
  "id": "space.highport.sites.defs",
  "defs": {
    "access": {
      "type": "object",
      "properties": {
        "audience": {
          "refs": [
            "space.highport.sites.defs#spaceMembers"
          ],
          "type": "union",
          "closed": true,
          "description": "Who the requireAuth paths are for. Absent means any signed-in reader. Only meaningful alongside requireAuth. The union is closed so that a host which does not recognize an audience rejects the record instead of opening the gate to everyone."
        },
        "requireAuth": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 1024
          },
          "maxLength": 64,
          "description": "Path prefixes that always require a signed-in reader and always bill that reader, whatever the owner budget says. Matched against the normalized request path, so a prefix covers everything under it. \"/\" gates the whole site, the same as an owner budget of zero."
        }
      },
      "description": "Which parts of a site require a signed-in reader, and which readers qualify. Absent means nothing is gated and the owner budget decides every path, which suits most sites. This is content policy, not billing: it lives in the record, so it moves with the site and anyone can read it."
    },
    "manifest": {
      "type": "object",
      "required": [
        "resources"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 1000,
          "description": "Bundle name. Required for tile content, optional for an inline site source.",
          "maxGraphemes": 100
        },
        "resources": {
          "type": "unknown",
          "description": "Map of absolute request path (starting with '/') to space.highport.sites.defs#resource, since Lexicon has no map type. Tile content must have a '/' entry, and sites should."
        }
      },
      "description": "A bundle of resources keyed by path, using bard's camelCase subset of a MASL bundle-mode document. It is a site's inline source or a tile's content."
    },
    "redirect": {
      "type": "object",
      "required": [
        "from",
        "to"
      ],
      "properties": {
        "to": {
          "type": "string",
          "maxLength": 2048,
          "description": "Destination path. Must be an absolute path that exists as a manifest key on this site."
        },
        "from": {
          "type": "string",
          "maxLength": 2048,
          "description": "The request path to match, optionally with a query string. Must match exactly."
        },
        "status": {
          "type": "integer",
          "description": "Redirect status. Defaults to 302.",
          "knownValues": [
            301,
            302,
            307,
            308
          ]
        }
      }
    },
    "resource": {
      "type": "object",
      "required": [
        "src"
      ],
      "properties": {
        "src": {
          "type": "blob",
          "description": "The blob holding this resource's bytes."
        },
        "status": {
          "type": "integer",
          "description": "Response status. Defaults to 200 for manifest entries and 404 for the notFound resource.",
          "knownValues": [
            200,
            404,
            410
          ]
        },
        "contentType": {
          "type": "string",
          "maxLength": 255,
          "description": "Content type to serve instead of the blob's mimeType."
        },
        "contentEncoding": {
          "type": "string",
          "description": "The encoding the stored blob already has. The origin serves it unchanged, with a matching Content-Encoding header.",
          "knownValues": [
            "gzip",
            "br",
            "zstd",
            "identity"
          ]
        }
      },
      "description": "One addressable resource in a manifest."
    },
    "wellKnown": {
      "type": "object",
      "properties": {
        "rasl": {
          "type": "boolean",
          "description": "Serve GET /.well-known/rasl/{cid} for every CID this site references. Default true."
        },
        "atproto": {
          "type": "boolean",
          "description": "Serve GET /.well-known/atproto-did with the site's owning DID. Default true."
        },
        "standardSitePublication": {
          "type": "string",
          "format": "at-uri",
          "description": "Serve GET /.well-known/site.standard.publication with this AT-URI. It must name a site.standard.publication record in the site owner's repository whose url host is this domain, or the site record is rejected at indexing. While set, a manifest entry at that path is rejected."
        }
      },
      "description": "Controls the responses bard generates under /.well-known/. Both flags default to true and exist only to turn things off. standardSitePublication is absent unless the publisher sets it."
    },
    "spaceMembers": {
      "type": "object",
      "properties": {},
      "description": "The members of the space this site lives in, as the space's host reports them. Only valid on a site served from a space, and rejected (not ignored) anywhere else. The record lists no members; the space's host is asked."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
