logo
Quick Start
Plugins
GitHub
Quick Start
Plugins
GitHub
logo

Started

Introduction
Quick Start

Concept

Config
Derive
Explicit Body
Group
Guard
Handler
Life Cycle
Numeric
Plugin
Route
Schema
State and Decorate

Patterns

After Handle
Body Parser
Cookie Signature
Cookie
Creating Documentation
Dependency Injection
End-to-End Type-Safety
Error Handling
File Upload
Lazy-Loading Module
Method Chaining
Mount
Reference Models
Remapping
Testing
Trace
WebSocket

Integrations

Cheat Sheet
Custom 404
Docker
Redirect
Redirect
Static File

Redirect#

You can specific header by accessing context.request.headers

import { Elysia } from "elysia";

new Elysia().post("/type", ({ request: { headers } }) => headers.get("Content-Type")).listen(8080);
Previous PageDocker
Next pageRedirect
ON THIS PAGE