Details

    • Bug
    • Resolution: Cannot Reproduce
    • Trivial
    • None
    • Professional Edition
    • API
    • None
    • Nginx

    Description

      When i use the API with this URL http://observium.domain/api/v0/devices  and a correct HTTP auth, server return the entire HTML website instead of JSON.

      this curl command : curl -u <username>:<password> http://observium.domain.com/api/v0/devices/

      return :

      <!DOCTYPE html>
      <html lang="en">
      <head>
        <base href="https://observium.domain/" />
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        
        <!-- CSS BEGIN -->
        <link href="css/observium.css?v=17.12.8994" rel="stylesheet" type="text/css" />
        <link href="css/sprite.css?v=17.12.8994" rel="stylesheet" type="text/css" />
        <!-- CSS END -->
        <!-- JS BEGIN -->
        <script type="text/javascript" src="js/jquery.min.js?v=17.12.8994"></script>
        <script type="text/javascript" src="js/bootstrap.min.js?v=17.12.8994"></script>
        <!-- JS END -->
        <!--[if lt IE 9]><script src="js/html5shiv.min.js"></script><![endif]-->

       

      Attachments

        Activity

          [OBS-2543] API return HTML

          This is probably caused by some breakage in your Apache .htaccess file. The file supplied in SVN should function correctly, the one you have seems to be steering API calls to the web UI.

          You can : 

          rm html/.htaccess

          svn up

           

          To restore the default version.

          adama Adam Armstrong added a comment - This is probably caused by some breakage in your Apache .htaccess file. The file supplied in SVN should function correctly, the one you have seems to be steering API calls to the web UI. You can :  rm html/.htaccess svn up   To restore the default version.

          People

            adama Adam Armstrong
            mklein Manuel KLEIN
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: