HTTPS routing suddenly stopped working in Grails

20 views
Skip to first unread message

Sherif Shehab

unread,
Nov 5, 2016, 7:03:42 AM11/5/16
to Grails Dev Discuss

In my Grails 2.5.1 application , i was using a filter to use HTTPS with some controllers , everything was working fine but suddenly this filter is not working any more .

Filter :


def filters = {
    all(controller:'checkout', action:'onlinePayment') {
        before = {

            if (!request.isSecure() /*&& !Environment.isDevelopmentMode()*/) {
                def url = "https://" + request.serverName+':8443' + request.forwardURI
                println "in filter"
                redirect(url: url, permanent: true)
                return false
            }
        }
        after = { Map model ->
        }
        afterView = { Exception e ->
        }
    }
}


Here is the checkout page :


is there something i need to check to fix this issue ?


Thanks


Raviteja Lokineni

unread,
Nov 8, 2016, 2:58:58 PM11/8/16
to grails-de...@googlegroups.com
Hmm, never heard of this ever before generally people do it like this.

Web Server (for ex: Apache HTTP server or nginx) ==> Application server (for ex: Tomcat)

These redirect rules are actually configured in Web Server layer. By the way I think this should go into stackoverflow.

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-discuss+unsub...@googlegroups.com.
To post to this group, send email to grails-dev-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/b9380dad-287e-4fb6-98be-ba3a83eb803c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Raviteja Lokineni | Business Intelligence Developer
TD Ameritrade


Reply all
Reply to author
Forward
0 new messages