forked from loris-imageserver/loris-docker
-
Notifications
You must be signed in to change notification settings - Fork 2
/
loris2.conf
139 lines (122 loc) · 4.57 KB
/
loris2.conf
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# loris2.conf
#
# This file is parsed by the ConfigObj library:
#
# <http://www.voidspace.org.uk/python/configobj.html>
#
# ConfigObj uses an ini-like syntax with a few important changes and extensions,
# which are explained here:
#
# <http://www.voidspace.org.uk/python/configobj.html#config-files>
#
# Note that 'unrepr' mode is used, which means that values are parsed as Python
# datatypes, e.g. strings are in quotes, integers are not, True is used for the
# boolean value TRUE, False for the boolean value FALSE, and lists are in []
# with commas (',') as the separators.
#
# <http://www.voidspace.org.uk/python/configobj.html#unrepr-mode>
#
# String interpolation is enabled using the "template" style. OS environment
# variables are available for interpolation, e.g., run_as_user='$USER'
#
# <http://www.voidspace.org.uk/python/configobj.html#string-interpolation>
#
[loris.Loris]
tmp_dp = '/tmp/loris2/tmp' # r--
www_dp = '/var/www/loris2' # r-x
run_as_user = 'www-data'
run_as_group = 'www-data'
enable_caching = True
redirect_canonical_image_request = False
redirect_id_slash_to_info = True
# max_size_above_full restricts interpolation of images on the server.
# Default value 200 means that a user cannot request image sizes greater than
# 200% of original image size (width or height).
# Set this value to 100 to disallow interpolation. Set to 0 to remove
# size restriction.
max_size_above_full = 200
#proxy_path=''
# cors_regex = ''
# NOTE: If supplied, cors_regex is passed to re.search():
# https://docs.python.org/2/library/re.html#re.search
# Any url_root:
# http://werkzeug.pocoo.org/docs/latest/wrappers/#werkzeug.wrappers.BaseRequest.url_root
# (i.e., https?://domain.edu(:port)?/) that matches will be
# set to the value of Access-Control-Allow-Origin.
[logging]
log_to = 'file' # 'console'|'file'
log_level = 'INFO' # 'DEBUG'|'INFO'|'WARNING'|'ERROR'|'CRITICAL'
log_dir = '/var/log/loris2' # rw-
max_size = 5242880 # 5 MB
max_backups = 5
format = '%(asctime)s (%(name)s) [%(levelname)s]: %(message)s'
[resolver]
impl = 'loris.resolver.SimpleFSResolver'
src_img_root = '/usr/local/share/images' # r--
#Example of one version of SimpleHTTResolver config
#[resolver]
#impl = 'loris.resolver.SimpleHTTPResolver'
#source_prefix='https://<server>/fedora/objects/'
#source_suffix='/datastreams/accessMaster/content'
#cache_root='/usr/local/share/images/loris'
#user='<if needed else remove this line>'
#pw='<if needed else remove this line>'
#cert='<SSL client cert for authentication>'
#key='<SSL client key for authentication>'
#ssl_check='<Check for SSL errors. Defaults to True. Set to False to ignore issues with self signed certificates>'
# Sample config for TemplateHTTResolver config
# [resolver]
# impl = 'loris.resolver.TemplateHTTPResolver'
# cache_root='/usr/local/share/images/loris'
## optional settings
# delimiter = "|" # optional delimiter for splitting identifier, allowing for n-values to be inserted into the template
# default_format
# head_resolvable = False
# templates = 'a, b, fedora, devfedora, fedora_obj_ds'
# [[a]]
# url='http://example.edu/images/%s'
# [[b]]
# url='http://example.edu/images-elsewhere/%s'
## optional overrides for requests using this template
# user='otheruser'
# pw='secret'
# [[fedora]]
# url='http://<server>/fedora/objects/%s/datastreams/accessMaster/content'
## optional overrides for requests using this template
# cert='/path/to/client.pem'
# key='/path/to/client.key'
# [[fedora_obj_ds]]
# url = 'http://<server>/fedora/objects/%s/datastreams/%s/content' # as used with delimiter option below
[img.ImageCache]
cache_dp = '/var/cache/loris' # rwx
[img_info.InfoCache]
cache_dp = '/var/cache/loris' # rwx
[transforms]
dither_bitonal_images = False
# To enable TIFF output, add "tif" here:
target_formats = ['jpg','png','gif','webp']
[[jpg]]
impl = 'JPG_Transformer'
[[tif]]
impl = 'TIF_Transformer'
[[png]]
impl = 'PNG_Transformer'
[[jp2]]
impl = 'KakaduJP2Transformer'
tmp_dp = '/tmp/loris/tmp/jp2' # rwx
kdu_expand = '/usr/local/bin/kdu_expand' # r-x
kdu_libs = '/usr/local/lib' # r--
num_threads = '4' # string!
mkfifo = '/usr/bin/mkfifo' # r-x
map_profile_to_srgb = False
srgb_profile_fp = '/usr/share/color/icc/colord/sRGB.icc' # r--
# Sample config for the OpenJPEG Transformer
# [[jp2]]
# src_format = 'jp2'
# impl = 'OPJ_JP2Transformer'
# tmp_dp = '/tmp/loris/tmp/jp2' # rwx
# opj_decompress = '/usr/local/bin/opj_decompress' # r-x
# opj_libs = '/usr/local/lib' # r--
# mkfifo = '/usr/bin/mkfifo' # r-x
# map_profile_to_srgb = True
# srgb_profile_fp = '/usr/share/color/icc/colord/sRGB.icc' # r--