ericferon / glpi-archimap

GLPI plugin for drawing architecture maps (based on draw.io)
GNU General Public License v2.0
19 stars 10 forks source link

Problem with HTTPS (FQDN) #56

Closed jcervantes-sipecom closed 2 years ago

jcervantes-sipecom commented 2 years ago

After I resolved: https://github.com/ericferon/glpi-archimap/issues/55

I'm facing a new problem, maybe I guess, with HTTPS when FQDN is specified, the drawing doesn't show up:

image

But in HTTP with IP and /glpi/ in the URL it's show OK. What could be do?

image

Glpi Version: 9.5.7 Plugin Version: 3.2.3

My apache conf for:

HTTP: "sites-enabled/glpi.conf"

<VirtualHost *:80>
        Include /etc/apache2/le_http_01_challenge_pre.conf
        ServerAdmin email@email.com
        ServerName FQDN
        DocumentRoot /var/www/html/glpi
        ServerAlias FQDN
Alias "/.well-known" "/var/www/html/.well-known"
#        ProxyPass / http://localhost/glpi/
#        ProxyPassReverse / http://localhost/glpi/
RewriteEngine on
RewriteCond %{SERVER_NAME} =FQDN
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
Include /etc/apache2/le_http_01_challenge_post.conf
</VirtualHost>

HTTPS: "sites-enabled/glpi-ssl.conf"

<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerAdmin email@email.com
        ServerName FQDN
        ServerAlias FQDN
        Alias "/.well-known" "/var/www/html/.well-known"
#        ProxyPass / http://localhost/glpi/
#        ProxyPassReverse / http://localhost/glpi/
        DocumentRoot /var/www/html/glpi
SSLCertificateFile /etc/apache2/certs/GLPI-OCS.crt
SSLCertificateKeyFile /etc/apache2/certs/GLPI-OCS.key
#Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
#<IfDefine IgnoreBlockComment>
#<IfModule mod_headers.c>
#        Header set Content-Security-Policy "script-src 'strict-dynamic' 'nonce-rAnd0m123' 'unsafe-inline' http: https:; frame-ancestors; 'self';object-src 'none';base-uri 'none'; require-trusted-types-for 'script';"
 #       Header set X-XSS-Protection "1; mode=block"
 #       Header always append X-Frame-Options SAMEORIGIN
 #       Header set X-Content-Type-Options nosniff
#        Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains"
#</IfModule>
#</IfDefine>
ericferon commented 2 years ago

I encountered some problems when I make evolve the plugin to the marketplace and GLPI version 10. One of the consequences was a blank screen. From my side, it is now solved in v3.2.4. Can you check whether it solves also your problem ? K.r,

jcervantes-sipecom commented 2 years ago

Hi, I found this issue is related with: https://github.com/ericferon/glpi-archimap/issues/57

I also reviewed the browser debugger and found the same error:

image

image

image

So then, I found this line:

App-Token: Copy here a token (menu Setup>General>API)

image

When I went to the Archimap configuration, I found the same text:

image

I created a new API KEY, with no IP (I don't know if this is insecure):

image

Pasted the API Key in the before configuration, with empty key value:

image

And now it's working:

image

Tested with Plugin Folder, and from marketplace, also with Edge, Chrome and Firefox.

image

It just takes a little while to load, but it does load.