# Custom header from remote site

**URL:** <https://meta.discourse.org/t/custom-header-from-remote-site/50623>\
**Category:** Support\
**Created:** [September 25, 2016, 8:15am UTC](https://meta.discourse.org/t/custom-header-from-remote-site/50623 "2016-09-25T08:15:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![deltaskelta](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@deltaskelta](https://meta.discourse.org/u/deltaskelta)\
**Post date:** [September 25, 2016, 8:15am UTC](https://meta.discourse.org/t/custom-header-from-remote-site/50623/1 "2016-09-25T08:15:55Z")

</div>

I have a custom header on my remote django site that renders some information so I decided to make a view for it and use an ajax request to load it into my discourse header when the page loads and it renders everything I need…

It worked beautifully except that since the request is coming from discourse and not the browser os the user, it is not showing that I am logged in in my custom header. (I am using sso, working fine, discourse avatar showing, and logged in, only my custom header links are showing as if I am not logged in on my main site)

How could I fix this? Is there a way I can make the ajax request come from the browser so it would be the actual request user and my site would show them as logged in?

or should I go a different route and send some of the user info along with the request to authenticate them?

for an example here is the jquery that gets the header menu:

```
<script>

    $(document).ready(function() {
        $.get( "https://my-domain.com/discourse/get-menu", function( data ) {
            $("#LLmenu").html( data );
        });
    })
</script>

```

---

<div class="post-metadata">

**Author:** ![deltaskelta](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@deltaskelta](https://meta.discourse.org/u/deltaskelta)\
**Post date:** [September 25, 2016, 11:02am UTC](https://meta.discourse.org/t/custom-header-from-remote-site/50623/2 "2016-09-25T11:02:03Z")

</div>

I had the cause wrong, it was due to not including credentials in a CORS request, solved by using ajax and including the credentials

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [September 25, 2016, 4:16pm UTC](https://meta.discourse.org/t/custom-header-from-remote-site/50623/3 "2016-09-25T16:16:03Z")

</div>


