thehyve/puppet-i2b2

View on GitHub
templates/proxy.php.erb

Summary

Maintainability
Test Coverage
<?php
  $allowed_urls = [
<% @css_sheets.select { |x| !x['local'] }.each do |sheet| -%>
  "<%= sheet[ 'filename' ] %>",
<% end -%>
  ];

  if( isset( $_GET[ 'url' ] ) && is_string( $_GET[ 'url' ] ) && in_array( $_GET[ 'url' ], $allowed_urls ) )
    readFile( $_GET[ 'url' ] );