mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +00:00
cfg: Remove redundant data in develop.config
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
3dfceda785
commit
a33160d6a4
@ -1,36 +1,8 @@
|
|||||||
[Path]
|
[Path]
|
||||||
# directory locations
|
|
||||||
file_root = %(parent_parent_dir)s
|
file_root = %(parent_parent_dir)s
|
||||||
config_dir = %(file_root)s/data/etc/plinth
|
config_dir = %(file_root)s/data/etc/plinth
|
||||||
data_dir = %(file_root)s/data/var/lib/plinth
|
data_dir = %(file_root)s/data/var/lib/plinth
|
||||||
server_dir = /plinth
|
|
||||||
actions_dir = %(file_root)s/actions
|
actions_dir = %(file_root)s/actions
|
||||||
doc_dir = %(file_root)s/doc
|
doc_dir = %(file_root)s/doc
|
||||||
custom_static_dir = %(file_root)s/data/var/www/plinth/custom/static
|
custom_static_dir = %(file_root)s/data/var/www/plinth/custom/static
|
||||||
|
|
||||||
# file locations
|
|
||||||
store_file = %(data_dir)s/plinth.sqlite3
|
store_file = %(data_dir)s/plinth.sqlite3
|
||||||
|
|
||||||
[Network]
|
|
||||||
host = 127.0.0.1
|
|
||||||
port = 8000
|
|
||||||
|
|
||||||
# Enable the following only if Plinth is behind a proxy server. The
|
|
||||||
# proxy server should properly clean and the following HTTP headers:
|
|
||||||
# X-Forwarded-For
|
|
||||||
# X-Forwarded-Host
|
|
||||||
# X-Forwarded-Proto
|
|
||||||
# If you enable these unnecessarily, this will lead to serious security
|
|
||||||
# problems. For more information, see
|
|
||||||
# https://docs.djangoproject.com/en/1.7/ref/settings/
|
|
||||||
#
|
|
||||||
# These are enabled by default in Plinth because the default
|
|
||||||
# configuration allows only connections from localhost
|
|
||||||
#
|
|
||||||
# Leave the values blank to disable
|
|
||||||
use_x_forwarded_for = True
|
|
||||||
use_x_forwarded_host = True
|
|
||||||
secure_proxy_ssl_header = HTTP_X_FORWARDED_PROTO
|
|
||||||
|
|
||||||
[Misc]
|
|
||||||
box_name = FreedomBox
|
|
||||||
|
|||||||
@ -28,13 +28,14 @@ pytestmark = pytest.mark.usefixtures('load_cfg')
|
|||||||
|
|
||||||
def test_read_default_config_file():
|
def test_read_default_config_file():
|
||||||
"""Verify that the default config file can be read correctly."""
|
"""Verify that the default config file can be read correctly."""
|
||||||
config_file = cfg.get_develop_config_path()
|
path = pathlib.Path(__file__).resolve().parent
|
||||||
|
config_file = path / 'data' / 'configs' / 'freedombox.config'
|
||||||
|
|
||||||
# Read the freedombox.config file directly
|
# Read the freedombox.config file directly
|
||||||
parser = configparser.ConfigParser(
|
parser = configparser.ConfigParser(
|
||||||
defaults={
|
defaults={
|
||||||
'parent_dir': pathlib.Path(config_file).parent,
|
'parent_dir': config_file.parent,
|
||||||
'parent_parent_dir': pathlib.Path(config_file).parent.parent
|
'parent_parent_dir': config_file.parent.parent
|
||||||
})
|
})
|
||||||
parser.read(config_file)
|
parser.read(config_file)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user