Greetings,
I’m just getting started with Frappe Builder. Web pages don’t display properly and can generate browser security warnings.
How can we fix metadata in pages that show HTTP when they should use relative links or https?
Here’s a sample:
<!DOCTYPE html>
<html lang="en">
<head>
<base href="http://mysite.com/pages/contact">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test Page - Contact</title>
<link rel="icon" href="/assets/builder/images/frappe_black.png" media="(prefers-color-scheme: light)"/>
<link rel="icon" href="/assets/builder/images/frappe_white.png" media="(prefers-color-scheme: dark)"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Contact"><meta name="description" content="Contact"><meta name="image" content="http://mysite.com/files/page-703e846e853e8cbe7862d70d5d2b97ee36ab184fee619d776b1a3c64c646b.jpeg"><meta name="language" content="en-US"><meta property="og:type" content="article"><meta property="og:title" content="Contact"><meta property="og:description" content="Contact"><meta property="og:image" content="http://mysite.com/files/page-703e846e853e8cbe7862d70d5d2b97ee36ab184fee619d776b1a3c64c646b.jpeg"><meta name="twitter:title" content="Contact"><meta name="twitter:description" content="Contact"><meta name="twitter:image" content="http://mysite.com/files/page-703e846e853e8cbe7862d70d5d2b97ee36ab184fee619d776b1a3c64c646b.jpeg"><meta name="twitter:card" content="summary_large_image">
<link rel="stylesheet" href="/assets/builder/reset.css?v=1" media="screen">
<link rel="preconnect" href="https://fonts.googleapis.com">
<style>body{height:100vh}</style>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Source\ Sans\ Pro, sans-serif:wght@400&display=swap" media="screen">
I’m wondering if this is due to my environment and if there’s any config changes that will fix it.
My Frappe server is behind a second NGINX reverse proxy. The reverse proxy handles the SSL payload and sends the connection on port 80 to frappe server.
With CMS systems like WordPress, I’ve enabled some workarounds in WordPress’s config.php file to handle https:// URLs while running on port 80.
Like:
/**
Handle SSL reverse proxy
*/
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
$_SERVER['HTTPS']='on';
if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
}
Is anyone else using a reverse proxy and Frappe Builder.