1

When I use file_create_url it return url with http instead of https.

Code Snippet:

$desimg = file_create_url($node->field_image->entity->getFileUri());

Due to which i m getting warning like below

Mixed Content: The page at 'https://www.example.com/' was loaded over HTTPS, but requested an insecure image 'http://www.example.com/sites/default/files/test/test_M_01.jpg'. This content should also be served over HTTPS.

I'm missing something?

1

1 Answer 1

0

It could be an issue of reverse proxy, read the below article this may solve your problem

https://www.drupal.org/project/metatag/issues/2842049

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.