inventory/config/server.py

26 lines
813 B
Python
Raw Normal View History

2024-05-12 02:18:32 +07:00
host = "localhost"
2024-08-09 15:46:52 +07:00
port = 11000
2024-05-12 02:18:32 +07:00
reloader = False
debug = False
server = 'gunicorn' # default = 'wsgiref'
2024-06-13 12:43:46 +07:00
session_opts = {
'session.type': 'file',
'session.cookie_expires': 5*60, # Session expiration in seconds: minutes*seconds
2024-06-30 14:32:42 +07:00
'session.data_dir': './.beaker/data',
2024-06-13 12:43:46 +07:00
'session.auto': True
}
2024-12-29 14:16:19 +07:00
def enable_cors():
response.headers['Access-Control-Allow-Origin' ] = '*'
response.headers['Access-Control-Allow-Methods'] = 'GET, POST, PUT, DELETE, OPTIONS'
response.headers['Access-Control-Allow-Headers'] = 'Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token, Authorization'
2023-11-04 19:12:11 +07:00
2024-05-12 02:18:32 +07:00
# error page 403
# error page 404
# error page 500
2023-11-04 19:12:11 +07:00
2024-05-12 02:18:32 +07:00
# max_request_body_size = 800 * 1024 * 1024 , # Multiply for 800MB result
# socket timeout = 60
# response timeout = 3600