Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
106
Merge Requests
106
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
37f881ef
Commit
37f881ef
authored
Jul 19, 2018
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend: Fix monitor cors-domains
parent
7e2fa75d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
3 deletions
+21
-3
software/caddy-frontend/buildout.hash.cfg
software/caddy-frontend/buildout.hash.cfg
+1
-1
software/caddy-frontend/instance-apache-frontend.cfg
software/caddy-frontend/instance-apache-frontend.cfg
+2
-2
software/caddy-frontend/test/test.py
software/caddy-frontend/test/test.py
+8
-0
software/caddy-frontend/test/test_data/test.TestSlave.test_master_partition_state-APACHE.txt
...ata/test.TestSlave.test_master_partition_state-APACHE.txt
+5
-0
software/caddy-frontend/test/test_data/test.TestSlave.test_master_partition_state-CADDY.txt
...data/test.TestSlave.test_master_partition_state-CADDY.txt
+5
-0
No files found.
software/caddy-frontend/buildout.hash.cfg
View file @
37f881ef
...
...
@@ -18,7 +18,7 @@ md5sum = 906e5bd66b1265b8109a86b6ab46e91f
[template-apache-frontend]
filename = instance-apache-frontend.cfg
md5sum =
a0e1e10f154342e8cc9936066e855b8f
md5sum =
b170d0987563b481eb71cf705c3658ab
[template-apache-replicate]
filename = instance-apache-replicate.cfg.in
...
...
software/caddy-frontend/instance-apache-frontend.cfg
View file @
37f881ef
...
...
@@ -127,7 +127,6 @@ configuration.trafficserver-mgmt-port = 8084
configuration.re6st-verification-url = http://[2001:67c:1254:4::1]/index.html
configuration.enable-http2-by-default = true
configuration.mpm-graceful-shutdown-timeout = 5
configuration.monitor-cors-domains =
configuration.monitor-httpd-port = 8072
[frontend-configuration]
...
...
@@ -622,6 +621,7 @@ apache-certificate =
open-port = 80 443
extra_slave_instance_list =
frontend-name =
monitor-cors-domains =
monitor-username = $${monitor-instance-parameter:username}
monitor-password = $${monitor-htpasswd:passwd}
...
...
@@ -631,7 +631,7 @@ monitor-password = $${monitor-htpasswd:passwd}
[monitor-instance-parameter]
monitor-httpd-port = $${instance-parameter:configuration.monitor-httpd-port}
cors-domains = $${
instance-parameter:configuration.
monitor-cors-domains}
cors-domains = $${
slap-parameter:
monitor-cors-domains}
username = $${slap-parameter:monitor-username}
password = $${slap-parameter:monitor-password}
...
...
software/caddy-frontend/test/test.py
View file @
37f881ef
...
...
@@ -735,6 +735,14 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
set
(),
set
(
os
.
listdir
(
os
.
path
.
join
(
partition_path
,
'etc'
,
'monitor-promise'
))))
# check that monitor cors domains are correctly setup by file presence, as
# we trust monitor stack being tested in proper place and it is too hard
# to have working monitor with local proxy
self
.
assertTestData
(
open
(
os
.
path
.
join
(
partition_path
,
'etc'
,
'httpd-cors.cfg'
),
'r'
).
read
().
strip
())
def
test_empty
(
self
):
parameter_dict
=
self
.
slave_connection_parameter_dict_dict
[
'empty'
]
...
...
software/caddy-frontend/test/test_data/test.TestSlave.test_master_partition_state-APACHE.txt
0 → 100644
View file @
37f881ef
SetEnvIf Origin "^http(s)?://(.+\.)?(monitor\.app\.officejs\.com)$" ORIGIN_DOMAIN=$0
Header always set Access-Control-Allow-Origin "%{ORIGIN_DOMAIN}e" env=ORIGIN_DOMAIN
Header always set Access-Control-Allow-Credentials "true" env=ORIGIN_DOMAIN
Header always set Access-Control-Allow-Methods "PROPFIND, PROPPATCH, COPY, MOVE, DELETE, MKCOL, LOCK, UNLOCK, PUT, GETLIB, VERSION-CONTROL, CHECKIN, CHECKOUT, UNCHECKOUT, REPORT, UPDATE, CANCELUPLOAD, HEAD, OPTIONS, GET, POST" env=ORIGIN_DOMAIN
Header always set Access-Control-Allow-Headers "Overwrite, Destination, Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Authorization" env=ORIGIN_DOMAIN
\ No newline at end of file
software/caddy-frontend/test/test_data/test.TestSlave.test_master_partition_state-CADDY.txt
0 → 100644
View file @
37f881ef
SetEnvIf Origin "^http(s)?://(.+\.)?(monitor\.app\.officejs\.com)$" ORIGIN_DOMAIN=$0
Header always set Access-Control-Allow-Origin "%{ORIGIN_DOMAIN}e" env=ORIGIN_DOMAIN
Header always set Access-Control-Allow-Credentials "true" env=ORIGIN_DOMAIN
Header always set Access-Control-Allow-Methods "PROPFIND, PROPPATCH, COPY, MOVE, DELETE, MKCOL, LOCK, UNLOCK, PUT, GETLIB, VERSION-CONTROL, CHECKIN, CHECKOUT, UNCHECKOUT, REPORT, UPDATE, CANCELUPLOAD, HEAD, OPTIONS, GET, POST" env=ORIGIN_DOMAIN
Header always set Access-Control-Allow-Headers "Overwrite, Destination, Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Authorization" env=ORIGIN_DOMAIN
\ No newline at end of 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