Skip to content

Serve Spa

GET
/{path}
curl --request GET \
--url https://example.com/example

Serve React SPA.

  • If the requested path matches a file in static dir, serve it
  • Otherwise, serve index.html for client-side routing

index.html is served with no-store to ensure the browser always fetches the latest version (asset filenames contain content hashes).

path
required
Path
string

Successful Response

Media type application/json
Example generated
example

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}