I have created public REST resource using APEX
https://stream-capricorn-3239-dev-ed.scratch.my.salesforce-sites.com/services/apexrest/helloWorld
@RestResource(urlMapping='/helloWorld/*')
global class RestWebservice {
@HttpGet
global static String helloWorld(){
return 'HelloWorld';
}
}
it works perfectly when we make calls without Bearer Token Header.
curl --location --request GET 'https://stream-capricorn-3239-dev-ed.scratch.my.salesforce-sites.com/services/apexrest/helloWorld' \
--header 'Content-Type: application/json' \
Whereas my external system appends a reference bearer token header on each call it makes to salesforce is failing.
curl --location --request GET 'https://stream-capricorn-3239-dev-ed.scratch.my.salesforce-sites.com/services/apexrest/helloWorld' \
--header 'Authorization: Bearer dummy_value' \
Any help resolving this issue, Unable to change external system behaviour or add new header to the request.
The only option I have is handling through Salesforce, any chance we can bypass in Salesforce?
Authorization
header.