2.3 as3cf_local_domains filter not working when current URL has port number
-
I’m testing our site locally on localhost:8000.
In the past, adding our live domain via the as3cf_local_domains filter made everything work correctly, as per the help page Filtering URLs for multiple domains.
This has stopped working in the latest release. If I host my local version on port 80 (i.e. no port in the URL), it works again.
Doing a quick bit of debugging, the list of URLs coming from AS3CF_Local_To_S3::get_bare_upload_base_urls() is:
array(3) { [0]=> string(30) "//localhost:8000/wp-content/uploads" [1]=> string(30) "//localhost:8000/wp-content/uploads" [2]=> string(49) "//www.mydomain.com:8000/wp-content/uploads" }
This is with the filter is as follows:
function as3cf_local_domains( $domains ) { $domains[] = 'www.mydomain.com'; return $domains; } add_filter( 'as3cf_local_domains', 'as3cf_local_domains', 10, 1 );
The port number should not be added to our live domain.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘2.3 as3cf_local_domains filter not working when current URL has port number’ is closed to new replies.