ui-router: 406 Not Acceptable with version 0.2.13

I’m loading UI router from jsdelivr version 0.2.13 and I get 406 Not Acceptable on angular’s

xhr.send(post || null);

The same goes for 0.2.12 but everything works fine with 0.2.11.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 19 (6 by maintainers)

Most upvoted comments

I put this inside my module’s config:

.config(["$httpProvider",
 function($httpProvider) {

   $httpProvider.interceptors.push(function() {
     return {
       "request": function(config) {
         if (config.url && config.url.endsWith(".html")){
           config.headers["Content-Type"] = "text/html; charset=utf=8";
           config.headers["Accept"] = "text/html; charset=utf=8";
         }
         return config;
       }
     };
   });


 };