Default
Default handler for ODIN server.
This module provides a default URL ('/') handler for the ODIN server, redirecting the client to the static page handler.
Tim Nicholls, STFC Application Engineering
DefaultRoute
Bases: Route
Default URL Route for the ODIN server.
Source code in src/odin_control/http/routes/default.py
__init__(path, default_filename='index.html', enable_cors=False, cors_origin='*')
Initialise the default route, adding a handler.
This route provides the default view for the ODIN server, rendering static content suitable for use in a browser.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
path to serve static content from |
required | |
default_filename
|
default filename serve for directory requests |
'index.html'
|
|
enable_cors
|
flag to enable CORS request support |
False
|
|
cors_origin
|
CORS allowed origins |
'*'
|