mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
A role-files-layout exemption frees a tree from files/<lang>/ because its import paths are fixed from outside. The mirrored-test lint derived its scope from that same directory, so every layout exemption silently became a test exemption nobody ever argued for. The language now comes from the file suffix. Test code is excluded by scope rather than exempted: a test-* role and a files/playwright/ or files/test/ tree are the tests, so demanding a test of them is circular. The eleven files this newly reaches are framework-instantiated and carry a stated reason each.
26 lines
794 B
PHP
26 lines
794 B
PHP
<?php
|
|
// nocheck: mirrored-unit-test - registers add_filter('http_request_args') at load; the body only runs inside a booted WordPress request
|
|
/**
|
|
* Plugin Name: Infinito.Nexus HTTP CA Trust
|
|
* Description: Point the WP HTTP API at the injected internal CA bundle so server-side wp_remote_* TLS (OIDC token exchange) verifies.
|
|
*/
|
|
|
|
if (!defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
add_filter('http_request_args', static function (array $args): array {
|
|
$candidates = [
|
|
getenv('CURL_CA_BUNDLE') ?: '',
|
|
getenv('CA_TRUST_CERT') ?: '',
|
|
getenv('SSL_CERT_FILE') ?: '',
|
|
];
|
|
foreach ($candidates as $bundle) {
|
|
if ($bundle !== '' && is_readable($bundle)) {
|
|
$args['sslcertificates'] = $bundle;
|
|
break;
|
|
}
|
|
}
|
|
return $args;
|
|
}, 10, 1);
|