cancel
Showing results for 
Search instead for 
Did you mean: 

CORS Issue while getting Custom Theme

Former Member
0 Kudos

I have designed the custom theme and saved it as default via SAP_FLP theme parameter in /UI2/NWBC_CFG_CUST Tcode. I have deleted User profile in SU01. Cleaned up all the caches, it is working fine when tested internally. However when I made it go live for public via SAP Web dispatcher as a reverse proxy, it is not loading the custom theme properly. On checking in the console, I came to know that XMLHTTPREQUEST to internal server (which is obviously not public) fails due to cross origin resource sharing (CORS) issue. It says no access origin allow parameter is placed in the response header. Any suggestion how to fix this issue as I am completely confused on it as it is a FIORI issue or SAP Web Dispatcher Issue?

Kindly help.

Accepted Solutions (1)

Accepted Solutions (1)

MahendraJ
Participant
0 Kudos

Hi Parth,

Please use the WebD URL in Application detail by Edit the Custom Theme in Theme_Designer.

This is happening because before going Live- you have maintained the Internal FQDN in theme designer for your Custom Theme and now you are trying to Run the External FQDN which is not configured in Theme Designer so just Edit/ add the exact FQDN in Theme_Designer. Save and build again........

Hope this will help!

KR,

~ Mahendra

0 Kudos

Hi Mahendra

Where do you add the FQDN in Theme-Designer?

MahendraJ
Participant
0 Kudos

FQDN is nothing but a portion after protocol (HTTP/ HTTPS).

For ex.- https://sapfiori.sap.com/sap/bc/<blah>

Here, sapfiori.sap.com is FQDN which must be same for all Fiori UI related URL.

KR,

~ Mahendra

Former Member
0 Kudos

Hi Mahendra

Thanks for your help.

I will try to pass the fully qualified domain name (FQDN) in theme designer tool, which is now of the web dispatcher's one. Will revert you whether the problem still persists or not.

Regards

Parth

Former Member
0 Kudos

Hi Dejan

The initial screen that comes after launching the Theme Designer, asks for the URL of Fiori Launchpad, there we input the FQDN i.e nothing but the Fully qualified Domain name.

Hope it is clear now.

Parth

MahendraJ
Participant
0 Kudos

That's Right!

KR,

~ Mahendra

Answers (2)

Answers (2)

former_member230839
Participant
0 Kudos

Hi Parth,

Were you able to solve the issue after accessing the theme designer from reverse proxy to build the theme again ?

Thanks,

Anil.

Former Member
0 Kudos

Hi Anil

Still the issue persists. Please tell me if you will get to know anything.

Regards

Parth

gill367
Active Contributor
0 Kudos

Hi Partha,

Follow the SAP note. It will be helpful in resolving this issue.


2041742 - UI Theme Designer für ABAP: Correct host for custom theme access



Regards,

Sarbjeet Singh


Former Member
0 Kudos

Hi Sarbjeet

Thanks for your suggestion, I applied this note earlier as we are using SAP web dispatcher in our case, but still the issue persists. It was showing the same CORS issue error.

Thanks

Parth

LutzR
Active Contributor
0 Kudos

Hi Parth, did you maintain table HTTPURLLOC (use SE16)? This fixed some theme problems on our side. But it only worked with one single table entry. With two entries the mess started all over again. Good luck, Lutz

Former Member
0 Kudos

I did not maintain table HTTPURLLOC. Frankly speaking heard it for very first time . Can you please elaborate what all entries shall I key in to resolve this issue?

Best Regards

Parth

LutzR
Active Contributor
0 Kudos

Hi Parth, in many cases ABAP applications do not know how to correctly generate absolute URLs. So you might call an application by it's web dispatcher URL but a framework somehow generates stylesheet, image or other URLs directly to the application server. By maintaining table HTTPURLLOC you give frameworks a hint how to behave if they look into it. Fiori framework does. It helped in our case.

On entry point for official documentation is Defining the Host Name of SAP Web Dispatcher - SAP Fiori Launchpad - SAP Library

But this is relevant in more cases than stated there.

The generic explanation of this table can be found here: Configuration Table HTTPURLLOC - Web Dynpro ABAP - SAP Library. This is relevant for more than Web Dynpro ABAP only.

We got rid of many problems after maintaing the following entry

MANDT: <application client>

SORT KEY: 10

PROTOCOL: HTTPS

HOST: webdispatcher.somedomain.com

PORT: 443

We got new problems when adding a second entry for HTTP. So better don't.

Regards, Lutz

former_member230839
Participant
0 Kudos

Hi Lutz,

Thanks for the details on HTTPURLLOC. Actually the custom theme issue via reverse proxy is resolved when i maintain the correct entry in this table, infact the change is the APPLCATN field in this table is having just /SAP/ without any pattern, so i removed that made it empty to solve the problem.

However now, even other web urls like Fiori launchpad designer as well need to be opened via reverse proxy URL, it is giving some problems with internal HOST URL. Is there something else i am missing here.? it would be great if you can add something here.

Thanks in Advance,

Anil.

LutzR
Active Contributor
0 Kudos

Hi Anil, the situation in our installation is as you describe.

Usually a second entry in HTTPURLLOC for the application server should fix this. But a second entry made things worse in our installation. We did not open an incident because we can live with this. We decided that everybody will always use the webdispatcher URL for all services. Nobody ever should use application server hostname. But my experience is nearly one year old.

My recommendation: If you cannot live with it give it a try with a second table entry. And if it does not work properly with two table entries open an incident.

Good luck,

Lutz

kammaje_cis
Active Contributor
0 Kudos

Parth, Can you provide Fiori URL and the URL you are getting CORS issue? What is it loading?

Have you mentioned complete URL anywhere? I

Former Member
0 Kudos

Hi Krishna

Thanks for your reply.

I am attaching the snapshot of the error I am getting.

The URL hidden with black mark is internal to the system where as one hidden with red mark is web dispatcher's URL ( i.e. working publicly) I have not explicitly mentioned any URL.

Please revert in case I am missing something.

FlorianBaehler
Explorer
0 Kudos

Hello Parth,

I'm facing the same issue. Did you solve the problem?