Skip to content

Commit 3c11088

Browse files
fix: don't redirect on ocf.b.e (#1251)
* fix: don't redirect on ocf.b.e * fix: it's actually here, see if it works * fix: it works * fix: remove server cors not necessary * fix: wrong one
1 parent 93809c9 commit 3c11088

File tree

1 file changed

+11
-8
lines changed
  • modules/ocf_www/manifests/site

1 file changed

+11
-8
lines changed

modules/ocf_www/manifests/site/www.pp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,6 @@
8484
],
8585

8686
directories => [
87-
{
88-
path => '/.well-known/matrix/server',
89-
provider => 'location',
90-
custom_fragment => '
91-
Header set Access-Control-Allow-Origin "*"
92-
',
93-
},
9487
{
9588
path => '/.well-known/matrix/client',
9689
provider => 'location',
@@ -169,7 +162,8 @@
169162
port => 80,
170163
docroot => '/var/www/html',
171164
redirectmatch_status => 301,
172-
redirectmatch_regexp => '^(.*)',
165+
# ugly exceptions
166+
redirectmatch_regexp => '^((?!\/\.well-known\/matrix\/(client|server)).*)',
173167
redirectmatch_dest => $canonical_url;
174168

175169
# redirect weird HTTPS -> canonical HTTPS
@@ -180,6 +174,15 @@
180174
'secure.ocf.berkeley.edu',
181175
$::fqdn,
182176
],
177+
directories => [
178+
{
179+
path => '/.well-known/matrix/client',
180+
provider => 'location',
181+
custom_fragment => '
182+
Header set Access-Control-Allow-Origin "*"
183+
',
184+
},
185+
],
183186
port => 443,
184187
docroot => '/var/www/html',
185188
redirectmatch_status => 301,

0 commit comments

Comments
 (0)