Programming challenges

TEST

This is a test !!!!

Apache config

<VirtualHost *:*>
ServerName webatlas.sanger.ac.uk
DocumentRoot ${PAGESMITH_SERVER_PATH}/sites/webatlas.sanger.ac.uk/htdocs
PerlSetVar X_Pagesmith_UsersOptions external_only
PerlAddVar X_Pagesmith_UsersOptions hide_group
PerlAddVar X_Pagesmith_UsersOptions no_register
PerlAddVar X_Pagesmith_UsersOptions hide_details
Include sanger.d/plugins-available/oa2-site.conf
Include core.d/user-accounts.conf
Include sanger.d/pagesmith-vhost2.conf

PerlSetVar X_Pagesmith_CSP "default-src 'self'; font-src 'self' fonts.gstatic.com; style-src 'unsafe-inline' fonts.googleapis.com 'self'; script-src 'unsafe-eval' 'nonce' 'self' fonts.googleapis.com; frame-ancestors 'self'; form-action 'self'"
PerlSetVar X_Pagesmith_DocType html5
PerlSetVar X_Pagesmith_ContentType html

## Handle /, /latest/, /latest/index.html by redirecting to about {a help page}
RewriteEngine on
RewriteRule ^/latest(/|/index.html)?$ /about/ [R,L]
RewriteRule ^/$ /about/ [R,L]

## Using an exception based rule - we specify which pages DO NOT need authentication
## uses a negative look ahead for the allowed paths.
<LocationMatch "^/(?!public/|latest/|index.html|about/|action/|users/|login|core/|new/|s-inst/|component/|form/).+">
## Make sure authenticated static content is not cached.
<IfModule mod_headers.c>
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires 0
</IfModule>
## Set access handler
SetHandler modperl
PerlAccessHandler Pagesmith::Apache::Access::GroupName
</LocationMatch>

## Now we again use an exception based rule - to select what we proxy back
## Start with files which do not need proxying {proxy path is "!"}
## Then the "static" webpage files which need to point to webatlas.cog S3
## Finally all other requests go back to the webatlasdatademo.cog S3
<IfModule mod_proxy.c>
SSLProxyEngine on
## Stuff we shouldn't proxy back...
ProxyPassMatch "/(core|new|s-inst|login|users|about|action|component|form)(/.*)?$" !
## Stuff we should proxy brack to the website bucket
ProxyPassMatch "^(/latest/.+)$" https://webatlas.cog.sanger.ac.uk/$1
ProxyPassMatch "^/([^/]+)/(index.html|static/.*|manifest.json|favicon.png)$" https://webatlas.cog.sanger.ac.uk/latest/$2
## Everything else goes back to the data bucket
ProxyPassMatch "^/(.+)$" https://webatlasdatademo.cog.sanger.ac.uk/$1
</IfModule>
</VirtualHost>