HTTPS to HTTP in web proxy

Confluence User - 30 Mar, 2023

Hi,
I am trying to change the protocol of Joget from HTTPS to HTTP, I am using a web proxy to the joget hosted port. I've got some CSRF errors when I try to use the joget plataform. How can I change the joget protocol to HTTP?
In Joget DX 7 I changed the CSRF config to disable and it worked, but in 8 I cannot even access the main page of joget if I disable it.
My error logs:
ERROR 29 Mar 2023 14:52:37 org.owasp.csrfguard.servlet.JavaScriptServlet - Referer domain 'https://mydomain/jw/web/userview/appcenter/home/_/home' does not match request domain: 'http://mydomain/jw/csrf'
ERROR 29 Mar 2023 14:52:39 org.owasp.csrfguard.servlet.JavaScriptServlet - Referer domain 'https://mydomain/jw/web/console/app/import?&_=1680112358782&__a_=appcenter&__u_=home' does not match request domain: 'http://mydomain/jw/csrf'

server

4


31 Mar, 2023
confluenceUser
confluenceUser

I solved temporarily the error setting org.owasp.csrfguard.JavascriptServlet.refererMatchDomain=false in your_tom_cat_directory/webapps/jw/WEB-INF/classes/Owasp.CsrfGuard.properties
but I really want some definitive solution to this problem if its possible.
grateful

31 Mar, 2023
confluenceUser
confluenceUser

Hi, I am assuming you are running on Apache Tomcat. With a reverse proxy using HTTPS, you will need to make sure that the Tomcat connector is configured for HTTPS, like in https://stackoverflow.com/questions/22680869/configure-tomcat-8-for-proxy-support-for-https.

04 Jun, 2023
confluenceUser
confluenceUser

I continue to have this same issue except the refererMatchDomain=false still does not solve it for me. Any new information?

21 Aug, 2023
confluenceUser
confluenceUser

If you are using nginx > tomcat, then in tomcat, you need


<Connector port="8080" protocol="HTTP/1.1"
           connectionTimeout="20000" maxThreads="2000"
           scheme="https"
           proxyPort="443"
           redirectPort="443" />


see NGINX as Proxy to Tomcat

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print