NGINX returns blank pages but the response code is always 200

This is my current setup:

server {     listen 80;     listen [::]:80;      server_name;      index  index.php index.html index.htm;      root  /var/www/;      location ~ \.php$   {          include fastcgi_params;         fastcgi_pass;         fastcgi_index index.php;      } } 

I have added a test.php file which when requested, give me a 200 response code. I’ve tested other pages, and they do the same, however, the pages are always blank.

I’ve tried different combinations of things here: but they don’t seem to work for me (404 response).

My WordPress installation is docker-based. In the same setup, I have MySQL and PHPMyAdmin. Those are both working fine. Nginx is installed directly on my Centos 7.6 server.

I read this: (Number 4 in the notes at the bottom of the page), and it looks like this problem could be occurring because I use Centos.

I’m not sure what could be missing.

The logs in /var/log/nginx/error.log don’t show anything.

Deserializing response to correct type

I use this method to get either Customer or Account. The server will determine which type it is.

The response will have a property "Type": "Customer" or "Type": "Account".

I first deserialize to Client (supertype) to check the Type property. Then deserialize to either Customer or Account.

public async Task<Models.Entities.Client> GetClient(int clientId) {     var getClientRequest = new RestRequest("client/details", Method.GET);     getClientRequest.AddQueryParameter("ClientId", clientId);      var jsonResponse = await _requestService.DoRequest(getClientRequest);      var client = JsonConvert.DeserializeObject<Models.Entities.Client>(jsonResponse);      switch (client.Type)     {         case ClientKind.Account:             var account = JsonConvert.DeserializeObject<Account>(jsonResponse)             return account;         default:             var customer = JsonConvert.DeserializeObject<Customer>(jsonResponse);             return customer;     } } 

Example responses:

{     "ClientId": 1,     "Type": "Account",     "Name": "Company Inc." } 
{     "ClientId": 2,     "Type": "Customer",     "Name":     {         "First": "John",         "Last": "Smith"     },     "DateOfBirth": "1960-12-01" } 


public class Client {     public int ClientId { get; set; }     public ClientType Type { get; set; } }  public class Account : Client {     public string Name { get; set; } }  public class Customer : Client {     public PersonalName Name { get; set; }     public DateTime DateOfBirth { get; set; } } 

TLS Handshake: no response to Client Hello from TLS1.0 Windows XP client [on hold]

First, I know TLS1.0 is bad, but I have no choice but to support it – we cannot control the client end, and not supporting a large percentage of clients would put us at a major competitive disadvantage for this project.

I’m not remotely expert when it comes to SSL/TLS/etc, but I think I have some idea how this is supposed to work.

I have written a service which is running on a windows 10 machine over https using a self-signed SSL Cert. This works fine provided (of course) any clients explicitly trust this Certificate or are configured to not validate the server cert. Ordinarily this will support TLS 1.1 & 1.2 but for the purposes of this test I’ve restricted it to 1.0 only

Some clients for this service are running on Windows XP (the specific one I have to test with is Windows XP Embedded SP2, but can’t state this is what all XP clients will use).

I’ve used NetMon to capture a network trace.

I believe it’s a cipher suite negotiation issue.

As a test I installed an old version of FireFox on the XP machine and used that to make a connection. This works ok but as I understand things FF uses its own TLS stack so obviously can agree on a cipher suite, but it does at least rule out any other networking things or issues with my service.

I’m using IISCrypto to view/amend related stuff on my windows 10 machine.

I’ve used NetMon to capture traces and can see Client Hello messages from these older clients, but no Server hello in response. I can see the client sends a list of (older) Cipher suites, the third of which is TLS_RSA_WITH_3DES_EDE_CBC_SHA, which is one I appear to have in my list

I’ve used IISCrypto to enable this cipher suite on my windows 10 machine and re-order the list such that it is at the top, but this has made no difference. It’s possible I added this to the list using IIS Crypto, but not sure at this point (been looking at this for several days)..

If I create a TLS 1.0-only client and run that on my machine locally it works fine.

My best guess is that one of the component parts of the cipher is not properly setup/existing… Can anyone suggest what I can change that may help?


wp_localize_script not working on ajax response

When a file is uploaded to my page I make an ajax call to add an entry in a database. I then want to send a string back to the client using wp_localize_script but when I try to access it I just get an error saying “Uncaught Reference Error: pw_script_vars is not defined”.

I know I can send something back with wp_die but this is a bit of a work around that I don’t think is the correct way. So the question is why is the wp_localize_script not working? Any help appreciated.


var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>"; jQuery(function($  ) {     var i;     for(i=1;i<21;i++){             $  ('body').on('change', '#file'+i, function() {                 var file_data = $  (this).prop('files')[0];                 var id = $  (this).attr('id');                  var form_data = new FormData();                  form_data.append('file', file_data);                 form_data.append('action', 'file_upload');                  jQuery.ajax({                     url: ajaxurl,                     type: 'POST',                     contentType: false,                     processData: false,                     data: form_data,                     success: function (response) {                         alert( pw_script_vars.alert );                     }                  });              });     } }); 


    add_action('wp_enqueue_scripts','owr_scripts_function');     add_action( 'wp_ajax_file_upload', 'file_upload_callback' );     add_action( 'wp_ajax_nopriv_file_upload', 'file_upload_callback' );      function owr_scripts_function() {           wp_enqueue_script( 'script', get_stylesheet_directory_uri() . '/script.js', array('jquery'), time(), false);     } function file_upload_callback(){     wp_localize_script('script', 'pw_script_vars', array(             'alert' => __('Hey! You have clicked the button!', 'pippin'),             'message' => __('You have clicked the other button. Good job!', 'pippin')         )     );     wp_die("upload success"); } 


jsonapi Cross-Origin Read Blocking (CORB) blocked cross-origin response in vue

I got the data with postman in json:api at drupal. enter image description here But I has error of CORB in Vue-resource.get() with code blew:

 data(){     return{         cyclePic:[],         rootUrl:this.$  http.options.root,         header:{headers:{Accept:'application/vnd.api+json',             'Content-type':'application/vnd.api+json',             Authorization:"Basic dG1wQWRtaW46VG1wQDEyMyM0NTY="}                             }                          } }, created(){     this.getCycleList() }, methods:{     getCycleList(){          this.$  http.get('jsonapi/node/banner?include=field_image',this.header).then(result=>{             console.log(result)              if(result.ok && result.status===200){                 this.cyclePic=result.body.included                 console.log(this.cyclePic)             }else{                 Toast('Fail')             }          })     } 

what i miss some thing?

How to get both request and response headers using Angular interceptor?

I’m using an Http Interceptor to set some special headers which we need for all requests, now I need to get one of those headers which I previously set, but I can only get response header, not request header

enter image description here

I’m trying to get that X-Cache-Id from the Request Headers (not Response Header)

Here is my interceptor code (the part which response is back)

return next.handle(requestWithHeaders).pipe(tap(event => {       if (event instanceof HttpResponse) {          console.log(event.headers.get('X-Cache-Id'));           // Returns: null       }      })); 

Google Response Sound (Ding sound) on clicking google mic or saying Ok google

Why after turning off all the accessibility services the sound is disabled and immediately after enabling accessibility of any third party app or inbuilt app ,this sound is enabled. I (perhaps everyone , I tested 3 phones at my home ) am facing this issue since two year. This is not an OS issue as it occurred in Marshmallow, Noughat as well as in Oreo.

I have found only one solution on the internet reagarding this & it is “Turn on Accessibility fpe at least one app”

What are the pros and cons of referring to a user’s “response” rather than a user’s “comment”?

Users’ replies to posts on a blog-type site, or replies to replies and so on, are usually called “comments”. And so long as the invitation to respond is not as cutesy as “Have your say” or “Join the conversation”, it usually takes the form of “Leave a comment” or “Post a comment”.

What are the pros and cons of using an alternative word to “comment”, such as “response”? For example, the number of replies might be given in the form “73 responses” and the invitation to respond could appear as “Post a response”.

Might the word “response” deter some users from posting throwaway waste-of-time remarks? Might it also induce some users whose replies would be welcome to believe that they are insufficiently “expert” to contribute? Or might it do both, reducing the demographic of possible responders unwantedly far? Perhaps the word “comment” is so predominant that the use of an alternative word would be considered tendentious?

Informed and considered opinions and references to research would be much appreciated!

Python classes to grab HTTP response from website entities

I am trying to implement a parent WebContent class and child classes to grab HTTP responses from the actual website entities. There are highlevel codes below and I am wondering what are people’s perspectives in terms of the neatest way to implement this in a OOP manner.

import requests from onelogin.api.client import OneLoginClient   class WebContent(object):      def __init__(self, client_id, client_secret, login, password, sub_domain, app_id, app_url):          self.client_id = client_id         self.client_secret = client_secret         self.app_id = app_id         self.app_url = app_url         self.login = login         self.password = password         self.sub_domain = sub_domain      def _login(self):         client = OneLoginClient(self.client_id, self.client_secret)         saml = client.get_saml_assertion(self.login,                                          self.password,                                          self.app_id,                                          self.sub_domain)         saml_data = saml.saml_response          session = requests.Session()         saml_payload = {'SAMLResponse': saml_data}"{}/sso/response".format(self.app_url), saml_payload)         return session      def get_content(self, endpoint, time_out=30):         if endpoint:             session = self._login()             result = session.get(endpoint, timeout=time_out)             session.close()             return result.content   class WebMarketingContent(WebContent):     def get_endpoint(self, entity_id):         base_url = "{app_url}/{entity_id}?{query_params}"         params = '&entity_id={}'.format(entity_id)         return base_url.format(app_url=self.app_url, query_params=params)   class WebEducationContent(WebContent):     def get_endpoint(self, entity_id):         base_url = "{app_url}/category/adhoc_element/{entity_id}?{query_params}"         params = '&entity_id={}'.format(entity_id)         return base_url.format(app_url=self.app_url, query_params=params)   if __name__ == '__main__':     web_marketing_content = WebMarketingContent('client_id',                                                 'client_secret',                                                 'email',                                                 'password',                                                 'sub_domain',                                                 'app_id',                                                 'app_url')      endpoint = web_marketing_content.get_endpoint(123)     result = web_marketing_content.get_content(endpoint)