Im trying to set a html5 game to an Iframe.
<iframe src="game url"></iframe>
The problem is the game url
needs authentication header (token) and I can't set token on iframe src.(as I know so far)
So I fetched the given game url using axios. and then passed em to Iframe srcdoc attribute no surprise I got errors. So what is the solution ?
here is what I get from the api on postman in which i can send http headers like authentication tokens. But how can i set it on iframe?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cocos Creator | FlappyTest1</title>
<!--http://www.html5rocks.com/en/mobile/mobifying/-->
<meta name="viewport"content="width=device-width,user-scalable=no,initial-scale=1, minimum scale=1,maximum-scale=1" />
</head>
<body>
<canvas id="GameCanvas" oncontextmenu="event.preventDefault()" tabindex="0"></canvas>
<script src="src/settings.718ea.js" charset="utf-8"></script>
<script src="main.62040.js" charset="utf-8"></script>
</body>
</html>
Im using React and redux but I think it doesn't matter