commit c3e813df0eaa15565b6d51478610b2b215eea4b3 Author: André Menrath Date: Thu Oct 3 15:27:19 2024 +0200 first commit diff --git a/localhost-https-development.php b/localhost-https-development.php new file mode 100644 index 0000000..2a1408c --- /dev/null +++ b/localhost-https-development.php @@ -0,0 +1,47 @@ += 3.2.2. ActivityPub plugin tested up to: 3.2.2. + * + * @license AGPL-3.0-or-later + * @package LocalHost_Https_Dev + */ + +// Exit if accessed directly. +defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore + +/** + * Add a filter for http_request_host_is_external + */ +add_filter( 'http_request_host_is_external', 'activitypub_event_bridge_custom_http_request_host_is_external', 10, 3 ); + +/** + * Add a filter for http_request_host_is_external + * + * @param bool $is_external Whether the request is external. + */ +function activitypub_event_bridge_custom_http_request_host_is_external( $is_external ) { + $is_external = true; + + return $is_external; +} + +/** + * Don't verify ssl certs for testing. + */ +add_filter( 'https_ssl_verify', 'activitypub_event_bridge_dont_verify_local_dev_https', 10, 3 ); + +/** + * Do not verify. + */ +function activitypub_event_bridge_dont_verify_local_dev_https() { + return false; +} diff --git a/readme.txt b/readme.txt new file mode 100644 index 0000000..b5889bd --- /dev/null +++ b/readme.txt @@ -0,0 +1,17 @@ +=== Localhost https Development === +Contributors: andremenrath +Tags: development +Requires at least: 6.5 +Tested up to: 6.6 +Stable tag: 0.1.0 +Requires PHP: 8.1 +License: AGPL-3.0-or-later +License URI: https://www.gnu.org/licenses/agpl-3.0.html + +Only allows for developing locally https ActivityPub stuff. + +== Description == + +Only allows for developing locally https ActivityPub stuff. + +Used together with https://code.event-federation.eu/Event-Federation/docker