[webmin-devel] redirect to some page
Sylvia Weber via webadmin-devel <[email protected]> Tue, 8 Sep 2020 11:43:45 +0000
| Newsgroups | gmane.comp.web.webmin.devel |
|---|---|
| Message-ID | <VI1PR09MB3837D74EEFE0BA9CE301474AED290@VI1PR09MB3837.eurprd09.prod.outlook.com> |
--===============7004920271625980365==
Content-Language: en-US
Content-Type: multipart/alternative;
boundary="_000_VI1PR09MB3837D74EEFE0BA9CE301474AED290VI1PR09MB3837eurp_"
--_000_VI1PR09MB3837D74EEFE0BA9CE301474AED290VI1PR09MB3837eurp_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi,
I am developing a custom webmin module and since a couple of days I am tryi=
ng to get a redirection to another page (CUPS on the same server as Webmin=
) to work.
When I am using the redirect-Function (&redirect("https://192.168.1.5:631")=
), the browser shows an error: CORS header 'Access-Control-Allow-Origin' mi=
ssing.
As mentioned in this bug (https://github.com/webmin/webmin/issues/1026), I =
added Access-Control-Allow-Origin: "https://192.168.5.1:631" to Extra HTTP =
headers in the Webmin Configuration but the result is the same. I also inst=
alled the browser add-on mentioned in issue 1026 (https://addons.mozilla.or=
g/en-US/firefox/addon/cookies-and-headers-analyser/) which shows the value =
'"https' for access-control-allow-origin. (By the way I also tried with sin=
gle and without quotation marks.) I don't know much about http headers, so =
I can't tell if Webmin or the add-on are cutting the value at the colon.
I did some further tests: If I use PrintHeader() instead of ui_print_header=
() the link works fine.
I am stuck now and don't know how to solve this problem.
Thanks a lot in advance for hints and help!
Sylvia
--_000_VI1PR09MB3837D74EEFE0BA9CE301474AED290VI1PR09MB3837eurp_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"NL" link=3D"#0563C1" vlink=3D"#954F72">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span lang=3D"EN-US">Hi, <o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">I am developing a custom webmin=
module and since a couple of days I am trying to get a redirection t=
o another page (CUPS on the same server as Webmin) to work.<o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">When I am using the redirect-Fu=
nction (&redirect("https://192.168.1.5:631")), the browser sh=
ows an error: CORS header 'Access-Control-Allow-Origin' missing.<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">As mentioned in this bug (https=
://github.com/webmin/webmin/issues/1026), I added Access-Control-Allow-Orig=
in: "https://192.168.5.1:631" to Extra HTTP headers in the Webmin=
Configuration but the result is the same. I also
installed the browser add-on mentioned in issue 1026 (https://addons.mozil=
la.org/en-US/firefox/addon/cookies-and-headers-analyser/) which shows the v=
alue ‘"https’ for access-control-allow-origin. (By the way=
I also tried with single and without quotation marks.)
I don't know much about http headers, so I can't tell if Webmin or the add=
-on are cutting the value at the colon.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">I did some further tests: If I =
use PrintHeader() instead of ui_print_header() the link works fine.<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">I am stuck now and don't know h=
ow to solve this problem.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Thanks a lot in advance for hin=
ts and help!<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"DE" style=3D"font-size:10.0pt;font-fam=
ily:"Arial",sans-serif;color:black;mso-fareast-language:EN-GB">Sy=
lvia</span><span lang=3D"DE"><o:p></o:p></span></p>
</div>
</body>
</html>
--_000_VI1PR09MB3837D74EEFE0BA9CE301474AED290VI1PR09MB3837eurp_--
--===============7004920271625980365==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============7004920271625980365==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-
Forwarded by the Webmin development list at [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel
--===============7004920271625980365==--