Search code examples
node.jsember.jsember-dataember-cli

Ember direct access to URL doesn't render, but navigating from homepage works


I have an ember application that is breaking if I try to direct access a URL sub route. If I navigate to the homepage and then to a sub route, it loads properly.

The issue that I'm seeing with direct access is the page outputs the HTML to the screen instead of parsing it, loading the JS libraries, and showing the normal content.

I work for a large corporation and can't post the site code, but would appreciate some help with common/likely causes where I can troubleshoot.


Solution

  • I had added a content-type = application/json header on my server side and it wasn't constrained to just API calls. For some reason this was only affecting pages when being directly accessed, and not the home page. I moved the header to only be used on API calls and all is well.