Skip to content

Rerouting  #896

@ematipico

Description

@ematipico

Summary

Programmatic control over routing.

Background & Motivation

As astro grows in popularity, it is being used for more and more use cases. One of these is multitenant websites where a tenant may be given a subdomain. This proposal introduces a powerful primitive that allows astro users to build websites with complex routing requirements. Rather than a limitation, file-based routing is now a sensible default!

Goals

  • Defuse.
  • Make it unnecessary to rely on implicit routing rules
  • Introduce framework-designed 404 and 500 pages
  • Make middleware run for requests that don't match a route (with framework-designed error pages)

Non-Goals

  • Reroute to an external service.
  • Support for functionPerRoute

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Implemented

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions