Hi,

I was able to resolve this issue by updating the HAPROXY configuration in the 
AAI VM, as you can see below, and now the AAI supports Cross Origin CORS.


OPTIONS /aai/v11/business/customers/ HTTP/1.1
Host: aai.api.simpledemo.onap.org:8443<http://aai.api.simpledemo.onap.org:8443>
Connection: keep-alive
Access-Control-Request-Method: GET
Origin: https://www.w3schools.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, 
like Gecko) Chrome/64.0.3282.186 Safari/537.36
Access-Control-Request-Headers: 
authorization,content-type,x-fromappid,x-transactionid
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9,ar;q=0.8


HTTP/1.1 200 OK
Date: Fri, 09 Mar 2018 07:42:28 GMT
Allow: GET,HEAD,POST,PUT,DELETE,TRACE,OPTIONS,CONNECT,PATCH
Connection: close
Server: Jetty(9.2.z-SNAPSHOT)
Strict-Transport-Security: max-age=16000000; includeSubDomains; preload;
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, HEAD, OPTIONS, POST, PUT
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, 
X-TransactionId, X-FromAppId, Content-Type, Access-Control-Request-Method, 
Access-Control-Request-Headers, Authorization




Thanks

Abdelmuhaimen Seaudi
Orange Labs Egypt
Email: [email protected]<mailto:[email protected]>
Mobile: +2012 84644 733

From: SEAUDI Abdelmuhaimen OBS/CSO
Sent: Thursday, March 8, 2018 7:07 PM
To: [email protected]
Cc: SEAUDI Abdelmuhaimen OBS/CSO
Subject: Cross Orgin Pre-flight Rest call to AAI

Hi

We are developing an Angular 4 web application based on ONAP Portal SDK.

When the webapp page javascript send Rest call to AAI, the browser sends a 
aross origin pre-flight OPTION request, without username/password.

This pre-flight OPTION request is rejected by AAI as 401 unauthorized.

How can we communicate properly with AAI ?


Sent from Samsung tablet.

_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce 
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou 
falsifie. Merci.

This message and its attachments may contain confidential or privileged 
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete 
this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been 
modified, changed or falsified.
Thank you.

_______________________________________________
onap-discuss mailing list
[email protected]
https://lists.onap.org/mailman/listinfo/onap-discuss

Reply via email to