# Custom header in request

**URL:** <https://community.dreamfactory.com/t/custom-header-in-request/1272>\
**Category:** REST API\
**Created:** [July 12, 2015, 2:25pm UTC](https://community.dreamfactory.com/t/custom-header-in-request/1272 "2015-07-12T14:25:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LukaszZ](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@LukaszZ](https://community.dreamfactory.com/u/LukaszZ)\
**Post date:** [July 12, 2015, 2:25pm UTC](https://community.dreamfactory.com/t/custom-header-in-request/1272/1 "2015-07-12T14:25:55Z")

</div>

Hi,  
Does Dreamfactory supports correctly custom headers in request?  
Some time ago was problem with this feature: [Remote Web Service and Headers](https://community.dreamfactory.com/t/remote-web-service-and-headers/703)  
I want connect to very basic external web service. I can’t do this adding “External headers” and I can’t using ajax request.  
My Ajax request:

```
 $.ajax({
    contentType: 'application/json',
    dataType:'json',
    type: 'GET',
    beforeSend: function (request)
        {
            request.setRequestHeader('X-Rest-ApiSign','SHA1XXXXXSIGN');
            request.setRequestHeader('X-Rest-ApiKey','XXXXXKEY');
            
        },
    url:location.protocol + '//' + location.host + '/rest/freshmail/reports/campaign/nyl6o36zfq',
    
    
    data:'app_name=Freshmailapp',
    cache:false,
    success:function (response) {
        $('#RESULTS_CONTAINER').html(JSON.stringify(response));
    },
    error:function (response) {
        console.log(response);
        alert("There was an error loading the make and model data.");
    }
});

```

Maybe you can give me some advice.

–EDIT–  
Maybe this is connected with: URL Routing Attacks ?  
I’m adding to header SHA1 string.  
@stadja in their post wrote that had some problems with basic authentication.

---

<div class="post-metadata">

**Author:** ![jeffreystables](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/jeffreystables/32/173_2.png) [@jeffreystables](https://community.dreamfactory.com/u/jeffreystables)\
**Post date:** [August 14, 2015, 3:35pm UTC](https://community.dreamfactory.com/t/custom-header-in-request/1272/2 "2015-08-14T15:35:33Z")

</div>

I have tested, and headers are passed through when configured properly.

![](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/dreamfactory/original/1X/baf89c75064cb5a99a98407a0a344f8fceb29666.png)

Can you confirm which headers are being received by the remote endpoint?
