Default Routing
When an application doesn’t have a specific routing profile configured, TypeAuth uses default routing behavior:Default Behavior
- All path components, query parameters, and headers are preserved
- Requests are forwarded to the configured origin by appending the incoming path
Routing Profiles
Routing profiles allow you to customize how requests are transformed before forwarding.Creating a Routing Profile
Via Dashboard
- Navigate to Applications
- Select your application
- Click “Routing Profiles”
- Create a new profile
Via API
Path Variables
You can define dynamic path segments using variables in curly braces{variable_name}
.
Variable Usage
- Variables are defined using the format:
{variable_name}
- Variables can be used in both source and target paths
- Values are automatically extracted and replaced
Supported Variable Locations
Variables can be used in:- Path segments
- Query parameters
- Headers
- Host names
Query String Handling
Default Behavior
- Query parameters are preserved by default
- Parameters order is maintained
Advanced Routing Features
Method-Based Routing
Define different rules based on HTTP methods:Rule Priority
When multiple rules match a request:- More specific paths take precedence
- Method-specific rules override generic rules
- Later rules in the configuration override earlier ones
Best Practices
- Start Simple: Begin with basic routing before adding complexity
- Use Meaningful Variables: Choose descriptive names for path variables
- Document Transformations: Keep track of your routing rules
- Test Thoroughly: Verify routing behavior with different request patterns
- Monitor Changes: Keep track of routing profile modifications
Examples
Basic Path Transformation
Variable Usage
Limitations
- Maximum of 50 rules per routing profile
- Maximum of 10 variables per rule
- Variable names must be alphanumeric
- Path maximum length: 2048 characters