on 2024 May 28 12:09 AM
Hi Experts,
I'll try to be as brief as possible - I have a front-end and back-end applications that i'm developing in SAP Business Application Studio.
Back-end is a node.js server using the express npm package.
Front-end is a fiori application.
I am utilizing "async await fetch" in my Fiori Controller Javascript to GET and POST from the Node.Js express server.
I have applied necessary CORS configuration to the Node.Js express server.
I run both applications from the terminal in Business Application Studio. I can successfully GET the endpoint on the back-end and retrieve results in the browser (because i'm logged into my S-User and authenticate with BTP).
However, when my front-end app does the GET request, I get 401, so I add Authentication header with Basic + base64string with username:password. Then I get CORS error.
Kindly explain the method for authenticating between two apps while developing in the BAS?
I've attached code screenshots.
Much Appreciated,
Reinhardt
Request clarification before answering.
Hi, in those types of situations (CORS errors, non-SAP backend) I've found I've had to use a proxy middleware when running my app in BAS like this one:
https://www.npmjs.com/package/@sap-ux/backend-proxy-middleware
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
11 | |
9 | |
8 | |
7 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.