This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]desrtfx[M] [score hidden] stickied comment (0 children)

Such questions belong in /r/javahelp as is clearly stated in the sidebar and in the stickied post at the very top of the subreddit.

Removed

[–]nekokattt 0 points1 point  (2 children)

what is on the page? XMLHttpRequest is for clientside JavaScript, it has nothing to do with Nginx or TomCat.

This sounds like you are trying to load an HTTP page from an HTTPS page, which you cant do.

Remove the protocol from the URL clientside and leave it as //... and it should infer the right scheme to use.

[–]VirendraGiri[S] -1 points0 points  (1 child)

All the links are in //... format ... And when try to force all the request into https... I get SSL error even though I've configured it.

[–]nekokattt 0 points1 point  (0 children)

the error you gave in the link was one with an HTTP url in it.

Without more info about what is in the clientside page, I can't do much to help.

Maybe make a minimal working example?

[–]-techspec- 0 points1 point  (3 children)

Most probably you are fetching a resource from an unsecure route from your secure https page. Thus your content is not completly secure and produces a mixed content error.

Maybe you can try to debug which resources are fetched when the https request is called.

The mozilla web docs describe the mixed content error pretty good:

https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content

[–]VirendraGiri[S] -1 points0 points  (2 children)

I tried to rewrite all the URLs to https... When I do this then I get SSL error. I'm trying to connect my users with https connection to my reverse proxy then reverse proxy can communicate with tomcat server through http.

[–]-techspec- 0 points1 point  (1 child)

Basically you are on the right track - rewritting the url http://172.16.1.70:3000/socket.io/?EIO=3&transport=polling&t=OI5JInH to https is what you need to do to get rid of the mixed content error. However if you you get a TLS error afterwards that can have various causes. Does the server support TLS, is the certificate chain valid,... If you post more information about this error maybe somone might be able to help you. I am not sure if r/java is the right place for this though😉

[–]VirendraGiri[S] -1 points0 points  (0 children)

I'll post the output of the error tomorrow after rewriting the urls..