I have a local web server sitting on 192.168.0.10
My AMP page looks like this:
<!DOCTYPE html>
<html amp lang="en">
<head>
<script async src="https://cdn.ampproject.org/v0.js"></script>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>
<title>TEST</title>
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
</head>
<body>
bla... bla.. bla..
<amp-iframe width="360" height="1160"
sandbox="allow-same-origin allow-scripts allow-forms allow-modals allow-top-navigation allow-popups"
layout="responsive"
title="Join Form"
src="http://192.168.0.10/test.php"
>
</amp-iframe>
</body>
</html>
I get the error:
Uncaught (in promise) Resource: failed to build: amp-iframe#1: Invalid src. Must start with https://. Found amp-iframe
Been searching for a solution for hours regarding this but nothing recommended works. Even chatGPT fails.
I need to load over http:// for development purposes. It's going to be a pain setting up https:// on the local server.
Once development is finished I'll use https:// on the live server.
Not a good answer but I ran into the same problem. For a quick solve I just put my project onto my personal server to test, made updates and passed the files via ftp. Could also trying using surge https://surge.sh/ if creating https server locally is a pain.
Otherwise checkout this git article https://gist.github.com/jfloff/5138826