Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Carlos Ramos Carreño
erp5
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
Show 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
...
@@ -18,7 +18,7 @@ md5sum = 906e5bd66b1265b8109a86b6ab46e91f
[template-apache-frontend]
[template-apache-frontend]
filename = instance-apache-frontend.cfg
filename = instance-apache-frontend.cfg
md5sum =
a0e1e10f154342e8cc9936066e855b8f
md5sum =
b170d0987563b481eb71cf705c3658ab
[template-apache-replicate]
[template-apache-replicate]
filename = instance-apache-replicate.cfg.in
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
...
@@ -127,7 +127,6 @@ configuration.trafficserver-mgmt-port = 8084
configuration.re6st-verification-url = http://[2001:67c:1254:4::1]/index.html
configuration.re6st-verification-url = http://[2001:67c:1254:4::1]/index.html
configuration.enable-http2-by-default = true
configuration.enable-http2-by-default = true
configuration.mpm-graceful-shutdown-timeout = 5
configuration.mpm-graceful-shutdown-timeout = 5
configuration.monitor-cors-domains =
configuration.monitor-httpd-port = 8072
configuration.monitor-httpd-port = 8072
[frontend-configuration]
[frontend-configuration]
...
@@ -622,6 +621,7 @@ apache-certificate =
...
@@ -622,6 +621,7 @@ apache-certificate =
open-port = 80 443
open-port = 80 443
extra_slave_instance_list =
extra_slave_instance_list =
frontend-name =
frontend-name =
monitor-cors-domains =
monitor-username = $${monitor-instance-parameter:username}
monitor-username = $${monitor-instance-parameter:username}
monitor-password = $${monitor-htpasswd:passwd}
monitor-password = $${monitor-htpasswd:passwd}
...
@@ -631,7 +631,7 @@ monitor-password = $${monitor-htpasswd:passwd}
...
@@ -631,7 +631,7 @@ monitor-password = $${monitor-htpasswd:passwd}
[monitor-instance-parameter]
[monitor-instance-parameter]
monitor-httpd-port = $${instance-parameter:configuration.monitor-httpd-port}
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}
username = $${slap-parameter:monitor-username}
password = $${slap-parameter:monitor-password}
password = $${slap-parameter:monitor-password}
...
...
software/caddy-frontend/test/test.py
View file @
37f881ef
...
@@ -735,6 +735,14 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
...
@@ -735,6 +735,14 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
set
(),
set
(),
set
(
os
.
listdir
(
os
.
path
.
join
(
partition_path
,
'etc'
,
'monitor-promise'
))))
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
):
def
test_empty
(
self
):
parameter_dict
=
self
.
slave_connection_parameter_dict_dict
[
parameter_dict
=
self
.
slave_connection_parameter_dict_dict
[
'empty'
]
'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