Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos-mynij-dev
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mynij
slapos-mynij-dev
Commits
ac1c250e
Commit
ac1c250e
authored
Feb 28, 2016
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slaprunner: Fix CORS domain script
parent
d0782d36
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
software/slaprunner/template/cors-domain.jinja
software/slaprunner/template/cors-domain.jinja
+4
-3
No files found.
software/slaprunner/template/cors-domain.jinja
View file @
ac1c250e
...
@@ -30,7 +30,10 @@ if not parser.has_option("cors", "cors-domain"):
...
@@ -30,7 +30,10 @@ if not parser.has_option("cors", "cors-domain"):
if "cors-domain" in form:
if "cors-domain" in form:
parser.set("cors", "cors-domain", form["cors-domain"].value)
parser.set("cors", "cors-domain", form["cors-domain"].value)
cors_domain_list = form["cors-domain"].value.split()
cors_domain_parameter = parser.get("cors", "cors-domain")
if cors_domain_parameter:
cors_domain_list = cors_domain_parameter.split()
cors_string = ""
cors_string = ""
for domain in cors_domain_list:
for domain in cors_domain_list:
if cors_string:
if cors_string:
...
@@ -41,8 +44,6 @@ if "cors-domain" in form:
...
@@ -41,8 +44,6 @@ if "cors-domain" in form:
file.write('Header always set Access-Control-Allow-Origin %{origin_is}e env=origin_is')
file.write('Header always set Access-Control-Allow-Origin %{origin_is}e env=origin_is')
subprocess.call('{{ httpd_graceful }}')
subprocess.call('{{ httpd_graceful }}')
cors_domain_parameter = parser.get("cors", "cors-domain")
with open(config_file, 'w') as file:
with open(config_file, 'w') as file:
parser.write(file)
parser.write(file)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment