Im gonna make this brief; Im using wp_remote_post to do a POST request to an external API. My local development environment looks something like "http://website.test". As of now I am requesting to a QA version of this API so the protocol of the endpoints is HTTP. The problem is that the $response object always returns an empty body. If I copy the exact request JSON that im sending over, and the exact HTTP URL of the API, and use it …
My admin panel is very slow I've tried to debug the issue. I nailed it to the function wp_remote_post and an internal error message thrown by curl on this line return new WP_Error( 'http_request_failed', curl_error( $handle ) ); I wonder what would have happened if I uninstalled curl. Can WordPress use other mechanisms to make http requests or is curl required?
Not very familiar with WordPress so I'm not sure what's causing this. Essentially, we have a few image assets stored under wp-content. When we access some assets (i.e. cmssubdomain.apex.com/wp-content/image.png) we are getting some peculiar behavior around the Referer request header: It works if accessed without the Referer header It works if accessed with the Referer header as long as the value matches the cms subdomain It fails once the Referer header is set to a value different than the subdomain …
I'm trying to change the cache-control header of a specific post (1234). I tried adding the following to the end of my functions.php: add_filter('wp_headers', 'wp_test_headers'); function wp_test_headers($headers) { if ( is_single ( 1234) ) { $headers['Cache-Control']="no-store, no-cache, must-revalidate, max-age=0"; } return $headers; } However when I open the page of the post in my browser, the condition is never met. Should I be adding the filter elsewhere, or is there another issue?
I have 2 equal .mp3 files - technically different files but both exported from Audacity using the same settings and the same original audio. Exactly the same size, same content (albeit processed separately) - one fails and one succeeds. Both files play fine but could some character in the file be tripping up the PHP upload? I see this error - ap_pass_brigade failed - in the log from last week - GoDaddy takes a long time getting the logs saved …
We have developed a mobile application using the JSON API plugin. The current website is running on HTTP, we are planning to change the website to HTTPS. Currently, mobile users on the live app are on HTTP; if we change the website to HTTPS then the app doesn't work so we have to publish a new app to work on HTTPS, but then the old app will not work, and we can't force a user to upgrade the app to …
My https has just expired. I have switch my domain from https to http in wp_options table. But all my assets are still on https when I visited website, I got all assets link error with 404. How can I switch my assets back to http? Site: http://www.kingdynasty.com.au
TLDR; Is there a way I can enable CORS for SVGs in my WordPress back-end, so I can get them through a http request to a different domain? Ideally without having to touch .htaccess? What I'm aiming for I am building a headless WordPress/React site. I would like to have my SVGs, uploaded to WP back-end, inlined into my front-end code (so I can access their DOM). I have URL to the SVG and react-inlinesvg library allows me to inline …
HTTP header of posts on my site looks like this: accept-ranges:bytes cache-control:public, max-age=0,public,public content-encoding:gzip content-length:5369 content-type:text/html; charset=UTF-8 date:Fri, 08 Dec 2017 07:27:40 GMT expires:Fri, 08 Dec 2017 07:19:33 GMT link:<https://example.com/?p=5697>; rel=shortlink server:Apache status:200 vary:Accept-Encoding How to remove this line from HTTP header responce: link:<https://example.com/?p=5697>; rel=shortlink Please, do not confuse this with <head> </head> section of HTML, I removed it from there already, I would like to remove it from HTTP header response too.
I build a page using Elementor it works fine and it responsive ( tested with inspector). But when I open the page on mobile phone some elements broke like on screen shots. But as I said in inspector works fine Also I noticed that this happens only when I am using https on domain if I used http the page works fine (online on mobile on PC the both domains working fine).
I have a Wordpress running in a load balancer scheme with two instances. For security reasons, i've decided to block wp admin access from the public url and allowing it from one of the instances. Using the application instance URL as the value of the WP_HOME variable causes each call to the wp-json REST API, either by wp-admin to save the publication or by the gutenberg editor to make use of the block editor, to persist in the database the …
So I've had this shortcode [site_url] working fine until a few days ago, now as I'm trying to use it again and it shows me a https// instead of https://. I've tried using this function: //Website URL shortcode [site_url] add_action( 'init', function() { add_shortcode( 'site_url', function( $atts = null, $content = null ) { return site_url(); } ); } ); And I've also tried this one: function create_site_url() { return home_url(); } add_shortcode('site_url', 'create_site_url'); I've also tried to check my …
i have moved my website to another server and changed the domain name, then i installed an SSL certificate, and when i change my website form http to https in wp-options and wp-config and also set a redirection to https in .htaccess my website didn't work only if i use http://mywebsite.com and when i change the http to https://mywebsite.com via chrome tab the JS and CSS file only load http and the website doesn't look as it must
I am usig Delphi XE10.3 + TIdHTTP(Indy)(10.6.2) control to visit websites. When visiting my website via Get method, I will get an exception "HTTP/1.1 406 Not Acceptable". I am not sure whether it is a problem of my program or my website, so I try to use my program to visit another website https://www.wordpress.com and this time I will NOT get the exception. Therefore, this is a problem of my website so I ask here. Based on Error:406 not acceptable, …
I'm not sure if this is a bug or if I'm missing anything. But according to the documentation for WP_Http::request(), you should be able to set the HTTP protocol version with the httpversion option. Indeed it seems to default to 1.0 according to line 181 of class-http.php: 'httpversion' => apply_filters( 'http_request_version', '1.0', $url ), But that value isn't actually passed down to Requests::request(). That method gets its default options from Requests::get_default_options(), which has an option, protocol_version, which defaults to 1.1. …
I would like to start using the WordPress REST API v2 to query information from my site. I've noticed that when I visit an endpoint URL directly, I can see all of the data publicly. I've also seen that a lot of tutorials mention the use of test or local servers rather than live sites. My questions are: Is this meant to be used on sites in production? Is there a security risk to allowing endpoints to be viewed by …
HTTP Error .. I’ve been trying off and on to debug this issue for the last few days and thus far have had no success. The proplem starts with BuddyPress plugin ( Profile Avatar Upload Section ) The uploads seems to work fine on the admin dashboard -> media but not on buddypress when i upload the png/jpg using buddypress it throws a HTTP error and it dose indeed save the img in the UPLOAD folder when i check it …
The following URL call, is redirected and processed by the 404.php page, indented to capture the s parameter. https://www.example.com/doc/?s=par For some reason, while try to processing the s parameter, none of the following alternatives succeed in reading the string 'par', echo 's0: "'.$filename0.'"<br>'; $filename1=htmlspecialchars($_GET['s']); echo 's1: "'.$filename1.'"<br>'; $filename2=get_query_var('s'); echo 's2: "'.$filename2.'"<br>'; It fails when using doc\, an empty folder, redirecting to the 404.php. When replacing that string with 404.php or with any not existing folder or file, the problem is …
I am building a website for my company which loads over HTTP inside the company and over HTTPS outside company's network. This is a compulsion and there is no way we can avoid it. The site needs to work over both HTTP and HTTPS. This mixed HTTP & HTTPS is giving a huge problem to us. I tried using plugins which make the URLs relative. But some URLs are still absolute and the admin panel doesn't open properly over HTTPS. …
I want to create a URL shortener where I use a REST API endpoint request to get a shortened url, e.g.: mywebsite.com/wp-json/wl/v1/shorten?url=url-to-shorten.com Where I get a response with a shortened version of the URL that I sent to the URL above, for example mywebsite.com/akjv3, which redirects to url-to-shorten.com. My question is if this is possible by using standard WordPress methods? I had some look at the documentation but could only find the following: Short URL Short Link Which are not …