Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mehraban
funkwhale
Commits
2f8a026a
Verified
Commit
2f8a026a
authored
7 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Can now configure allowed host in all settings
parent
c0724d3c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+1
-0
1 addition, 0 deletions
.gitlab-ci.yml
api/config/settings/common.py
+4
-0
4 additions, 0 deletions
api/config/settings/common.py
api/config/settings/production.py
+0
-1
0 additions, 1 deletion
api/config/settings/production.py
api/test.yml
+1
-0
1 addition, 0 deletions
api/test.yml
with
6 additions
and
1 deletion
.gitlab-ci.yml
+
1
−
0
View file @
2f8a026a
...
...
@@ -20,6 +20,7 @@ test_api:
paths
:
-
"
$PIP_CACHE_DIR"
variables
:
DJANGO_ALLOWED_HOSTS
:
"
localhost"
DATABASE_URL
:
"
postgresql://postgres@postgres/postgres"
before_script
:
...
...
This diff is collapsed.
Click to expand it.
api/config/settings/common.py
+
4
−
0
View file @
2f8a026a
...
...
@@ -23,6 +23,10 @@ try:
env
.
read_env
(
ROOT_DIR
.
file
(
'
.env
'
))
except
FileNotFoundError
:
pass
ALLOWED_HOSTS
=
env
.
list
(
'
DJANGO_ALLOWED_HOSTS
'
)
# APP CONFIGURATION
# ------------------------------------------------------------------------------
DJANGO_APPS
=
(
...
...
This diff is collapsed.
Click to expand it.
api/config/settings/production.py
+
0
−
1
View file @
2f8a026a
...
...
@@ -54,7 +54,6 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
# ------------------------------------------------------------------------------
# Hosts/domain names that are valid for this site
# See https://docs.djangoproject.com/en/1.6/ref/settings/#allowed-hosts
ALLOWED_HOSTS
=
env
.
list
(
'
DJANGO_ALLOWED_HOSTS
'
)
CSRF_TRUSTED_ORIGINS
=
ALLOWED_HOSTS
# END SITE CONFIGURATION
...
...
This diff is collapsed.
Click to expand it.
api/test.yml
+
1
−
0
View file @
2f8a026a
...
...
@@ -10,6 +10,7 @@ services:
volumes
:
-
.:/app
environment
:
-
"
DJANGO_ALLOWED_HOSTS=localhost"
-
"
DATABASE_URL=postgresql://postgres@postgres/postgres"
postgres
:
image
:
postgres
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment