Skip to content

Commit

Permalink
Merge pull request #6 from moreonion/csp
Browse files Browse the repository at this point in the history
feat: Declare CSP header requirements
  • Loading branch information
torotil authored Nov 25, 2024
2 parents edf8b7e + 6ed2613 commit c00ead2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:

jobs:
phpunit:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
php-versions: ["7.3", "7.4"]
php-versions: ["7.4"]
name: phpunit on PHP ${{ matrix.php-versions }}
env:
DB_DATABASE: drupal
Expand Down
9 changes: 9 additions & 0 deletions payone_payment.module
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,12 @@ function payone_payment_payment_delete(\Payment $payment) {
}, $payment->statuses);
Transaction::deleteIds($psiids);
}

/**
* Implements hook_d7csp_hosts().
*/
function payone_payment_d7csp_hosts() {
$hosts['connect-src'][] = 'https://secure.pay1.de';
$hosts['script-src'][] = 'https://secure.pay1.de';
return $hosts;
}

0 comments on commit c00ead2

Please # to comment.