Importing app from Apache server just fails

I want to import an app from an apache web server. It just ain't working. Importing from github works fine.

The server sees no traffic at all if i try a non-https import url

The server does see traffic via an https import url, and the logs confirm that the file was sent/http 200.

I thought the problem might be that the Content-Type field was just text/plain-- i compared it to github which is text/plain; charset=utf-8. so i updated it on my side, but it made no difference.

the sent header looks like this:

In all cases, no errors are reported on the hubitat page and no text is loaded/replaced in the text area.

bug ? clue ?

Could it be a CORS issue or anything else mentioned here?

1 Like

Indeed. There is no CORS on the server, and I vote that Hubitat should not be demanding that field at all. That's pretty-- wrong.

should behave the same as not having that field at all.

I also vote for for a 'feature' to be added where there is an error/reason shown on the webpage if the url is not imported. plain-http and the non-cors field just silently fail.

@bravenel @bobbyD

The way I hacked this, by the way - since there is no CORS on the server - was just to go inside the VirtualHost and append that field any time a file is accessed out of my tmp directory:

 <VirtualHost *:443>
   ...
   <Directory /home/hostedsites/www.jeremykister.com/www/tmp>
     Header set Access-Control-Allow-Origin "*"
   </Directory>
 </VirtualHost>

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.