Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-CloudComputing-E
/
E_Team_KhuBox
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
서승완
2020-06-10 07:52:06 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5c940c406d3405919ae39b1d85259227ff06d9b8
5c940c40
1 parent
4b16f4eb
Builds for 1 pipeline
canceled
in 2 seconds
feat: add cors headers to django
Changes
2
Builds
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
khubox-api/config/settings.py
khubox-api/requirements.txt
khubox-api/config/settings.py
View file @
5c940c4
...
...
@@ -32,6 +32,7 @@ ALLOWED_HOSTS = ['127.0.0.1', 'khubox-api.khunet.net']
INSTALLED_APPS
=
[
'khubox.apps.KhuboxConfig'
,
'corsheaders'
,
'django.contrib.admin'
,
'django.contrib.auth'
,
'django.contrib.contenttypes'
,
...
...
@@ -43,6 +44,7 @@ INSTALLED_APPS = [
MIDDLEWARE
=
[
'django.middleware.security.SecurityMiddleware'
,
'django.contrib.sessions.middleware.SessionMiddleware'
,
'corsheaders.middleware.CorsMiddleware'
,
'django.middleware.common.CommonMiddleware'
,
'django.contrib.auth.middleware.AuthenticationMiddleware'
,
'django.contrib.messages.middleware.MessageMiddleware'
,
...
...
@@ -129,3 +131,12 @@ S3_BUCKET = 'khubox-files'
CDN_PATH
=
'https://khubox-files.khunet.net'
CLOUDFRONT_KEY_ID
=
'APKAJ3FOBWI34OZJTXJQ'
CLOUDFRONT_KEY_PRIVATE
=
'-----BEGIN RSA PRIVATE KEY-----
\n
MIIEowIBAAKCAQEA18VtzURs+fQev5L00LRwRbJaObQI4kfJCIsOE7eWSOqq4Akh
\n
A7fI6vs3z8orXBvgc+k6GgAHrIdNwckxoQuTsCxrTDm1104qy1T4JkVxkIBYHJgH
\n
GzKUloK5IqdmcYbOK7IQeH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
KUImor3xYnPX5dbr4b0wgLD1rbf3V49q+Um98C1q086E6GCEPNP1aFwNc81lvtt0
\n
CHmcXZdVDGEZS4WbR7uPgwKBgBO/moY12lPQoPDsH75p3uVkjg9DVJLWo5XT1FTr
\n
ASyeSqw+b7Rl05BsDV+BqZNRdtNFhMRsANJMTHg4aAVJDh9nZBdGmMyZIEiKI/w8
\n
Em49fRgl+YvnSpoMuViS/EswxTfjBo8q+P7q6IxCHKNF9Ry+gNx14TizsEVL1XC3
\n
tkEjAoGBAMyp7wdPobJMXcclRVq6rqHs9OMcnZAveVKyxNgDbZu4OB5X4xTxGEYT
\n
NZQ0MFf/HcwlnH7797gVQeqF9dlqUJYe+Fc8lc/Rcwta/4R5uMgri9t8RKN91YKF
\n
UUFBsDEkWlkoAmfPkcrrq9cLJlmSNt3ehQj4p5iAJwoVBXXa++PO
\n
-----END RSA PRIVATE KEY-----'
# Cors
CORS_ALLOW_CREDENTIALS
=
True
CORS_ORIGIN_WHITELIST
=
[
'http://localhost:3000'
,
'http://127.0.0.1:3000'
,
'https://khubox.khunet.net'
,
]
...
...
khubox-api/requirements.txt
View file @
5c940c4
...
...
@@ -8,6 +8,7 @@ chardet==3.0.4
click==7.1.2
cryptography==2.9.2
Django==1.11.29
django-cors-headers==3.2.1
docutils==0.15.2
durationpy==0.5
future==0.18.2
...
...
Please
register
or
login
to post a comment