-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyhp.toml
75 lines (56 loc) · 1.81 KB
/
pyhp.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Configuration for PyHP (https://github.com/Deric-W/PyHP)
# This file uses the TOML syntax
[parser]
# regular expression matching the start of a code section
start = '<\?pyhp\s'
# regular expression matching the end of a code section
end = '\s\?>'
[compiler]
# if python code should be stripped of a starting indentation
dedent = true
# optimization level to be used with the builtin compile() function
# all levels: https://docs.python.org/3/library/functions.html#compile
optimization_level = -1
[backend]
# how container names should be resolved to objects
# module: the name is a module with a dot and the container name appended to it
# module.submodule.name
# path: the name is a file path with a double colon and the container name appended to it
# /path/to/file.py:name
resolve = "module"
# array of containers to build a hierarchy
[[backend.containers]]
# the name of the container
name = "pyhp.backends.files.Directory"
# configuration options for the container
config.path = "."
[interface]
# which interface to use, simple or php
name = "php"
[interface.config]
# default http status code
default_status = 200
# order to fill up REQUEST, values already present in REQUEST get overwritten
# unknown methods are skipped
request_order = [
"GET",
"POST",
"COOKIE"
]
# default http headers
[interface.config.default_headers]
# headers are stored as name-values pairs
Content-Type = ['text/html; charset="UTF-8"']
[interface.config.post]
# if wsgi.input should be parsed
enable = true
# max length of the entire post-data in bytes, omit for unlimited
max_size = 8000000
[interface.config.post.uploads]
# if file uploads are allowed
enable = true
# directory for uploaded files
# defaults to system temporary directory
#directory = /your/temp/dir
# how many files can be uploaded at once
max_files = 20