Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

ServiceBus Authentication on Pre-Flight request

$
0
0

Hi,

I've a Asp.Net Web Api rest service connected to Azure ServiceBus. 

I'm making ajax calls to this service. So I need an access Token to be passed as a header i.e. "Authorization : WRAP access_token=<my_token>" with the call.

This works fine when I make a direct GET request using Postman or RestClient. But when I make an ajax call from my website the browser makes it a pre-flight request. The Authorization header passed to this call is passed in another header called access-control-request-headers. Hence the service bus doesn't receives any header named Authorization and returns 401-Not Authorized error without even hitting the api service.

I need suggestions on how to either dodge the request from getting pre-flighted or pass the Authorization header as a direct header in pre-flight request.



Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>