bootstrap.min.js redirect

classic Classic list List threaded Threaded
9 messages Options
MB
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bootstrap.min.js redirect

MB
This post was updated on .
Hi Yan, Our GLU setup is comprised of a VIP behind which we have two servers running GLU webapp in active/passive configuration. The VIP serves secure content over HTTPS and handles the SSH handoff so that the GLU webapps can serve plain HTTP. With browsers becoming more strict about unsecure content over HTTPS connections, we started experiencing a problem with bootstrap.min.js. The browser requests https://[base_url]/console/js/bootstrap.min.js but the GLU webapp redirects to http://[base_url]/console/static/js/bootstrap.min.js. At this point, the browser complains about "Mixed Content: The page at 'https://[base_url]/console/dashboard?fabric=production-wm#' was loaded over HTTPS, but requested an insecure script 'http://base_url]/console/static/js/bootstrap.min.js'. This request has been blocked; the content must be served over HTTPS." As a result of this error, the fabric selector on the top right corner of the dashboard doesn't work. Do you have any idea on how to resolve this on the GLU side? Thank you
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bootstrap.min.js redirect

frenchyan
Administrator
Check out this section of the documentation: http://pongasoft.github.io/glu/docs/latest/html/meta-model.html#consoles particularly the note:

Note

The console server is a jetty server (a web application server) and can be configured further if you want to put it behind a web server (like nginx, apache,... ). For example:

ports: [
  mainPort: 9090,
  externalPort: 80
],
internalPath: '/console',
externalHost: 'www.glu-console.acme.org',
externalPath: '/',

In your case you need to set your externalPort to 443 and externalHost to your vip (you can also adjust externalPath if necessary).

If you are not using the meta model, then you need to manually change the file conf/glu-consonle-webapp.groovy and set

grails.serverURL = "https://<vip>/console" 

(/console is only if you don't want the console to be under /console from the outside).

Yan


MB
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bootstrap.min.js redirect

MB
Thank you for your quick response, Yan.

We don't use the meta-model because we set grails.serverURL to the VIP URL in glu-console-webapp.groovy.

As far as we can tell, our setup is working fine except for bootstrap.min.js which exhibits the aforementioned issue.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bootstrap.min.js redirect

frenchyan
Administrator
So if I understand correctly, you already have the proper setup in the config file but it does not work for bootstrap.min.js.

I will try to reproduce on my end.

Yan

On Thu, Mar 12, 2015 at 12:49 PM, MB [via glu] <[hidden email]> wrote:
Thank you for your quick response, Yan.

We don't use the meta-model because we set grails.serverURL to the VIP URL in glu-console-webapp.groovy.

As far as we can tell, our setup is working fine except for bootstrap.min.js which exhibits the aforementioned issue.


If you reply to this email, your message will be added to the discussion below:
http://glu.977617.n3.nabble.com/bootstrap-min-js-redirect-tp4026861p4026863.html
To start a new topic under glu, email [hidden email]
To unsubscribe from glu, click here.
NAML

MB
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bootstrap.min.js redirect

MB
Yes, correct.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bootstrap.min.js redirect

frenchyan
Administrator
I am not able to reproduce the problem.

I changed the my config file this way:

grails.serverURL = "http://argon.local:8080/console"

(argon.local is my machine, vs using localhost)

See screenshot attached. It ends up requesting the proper url even if I go to localhost with my browser.

Is it happening on all pages? Can you use tools (like the Google Developer tools in Chrome) to see what is going?

Yan

Screen Shot 2015-03-16 at 15.18.48.png (109K) Download Attachment
MB
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bootstrap.min.js redirect

MB
Yes, it is happening on all the pages and I used the Chrome tools to track the issue down (see screenshot).

As you can see here the console is making an HTTPS request.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bootstrap.min.js redirect

frenchyan
Administrator
Can you send the (html) source of this page? (View-Source)?

Thank you
Yan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bootstrap.min.js redirect

frenchyan
Administrator
To follow up on this thread, I have created a ticket to keep track of this issue and will fix it for the next release of glu.

https://github.com/pongasoft/glu/issues/280 -- /console/js/bootstrap.min.js redirects bypasses serverURL

Yan
Loading...