<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>IFrame Portlet Basic Authentication to a subdomain different website</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121398528" />
  <subtitle>IFrame Portlet Basic Authentication to a subdomain different website</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121398528</id>
  <updated>2026-04-04T05:47:57Z</updated>
  <dc:date>2026-04-04T05:47:57Z</dc:date>
  <entry>
    <title>IFrame Portlet Basic Authentication to a subdomain different website</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121398527" />
    <author>
      <name>Serge Byishimo</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121398527</id>
    <updated>2022-04-11T18:35:50Z</updated>
    <published>2022-04-11T17:54:52Z</published>
    <summary type="html">&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I'm trying to use IFrame Portlet Basic Authentication to auto-login
  in a subdomain different website (example.liferay-website.com) and
  from what I can see, the Fetch API is not adding the Authorization
  header to the request, which is probably because the
  &amp;quot;authorization&amp;quot; header is not
  &lt;code&gt;CORS&lt;/code&gt;-&lt;code&gt;safelisted&lt;/code&gt; [1]&lt;/p&gt;
&lt;p&gt;Liferay is using Fetch API no-cors mode [2] which&lt;code&gt; checks if the
    headers are CORS-safelisted.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;
  &lt;code&gt;So I'm wondering if what i'm trying to accomplish is possible
    and how.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;
  &lt;code&gt;Best regards,&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;[1] https://stackoverflow.com/questions/44606244/using-fetch-api-with-mode-no-cors-can-t-set-request-headers&lt;/p&gt;
&lt;p&gt;[2] : https://github.com/liferay/liferay-portal/blob/ad3ddfdd30a5364c28d44d96c86e2d5bb3628093/modules/apps/iframe/iframe-web/src/main/resources/META-INF/resources/view.jsp#L175&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Serge Byishimo</dc:creator>
    <dc:date>2022-04-11T17:54:52Z</dc:date>
  </entry>
</feed>
