On this page
apply_filters( 'http_allowed_safe_ports', array $allowed_ports, string $host, string $url )
Controls the list of ports considered safe in HTTP API.
Description
Allows to change and allow external requests for the HTTP request.
Parameters
$allowed_portsarray-
Array of integers for valid ports.
$hoststring-
Host name of the requested URL.
$urlstring-
Requested URL.
Source
File: wp-includes/http.php. View all references
$allowed_ports = apply_filters( 'http_allowed_safe_ports', array( 80, 443, 8080 ), $host, $url );
Related
Used By
| Used By | Description |
|---|---|
| wp_http_validate_url() wp-includes/http.php | Validate a URL for safe use in the HTTP API. |
Changelog
| Version | Description |
|---|---|
| 5.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/http_allowed_safe_ports