Force HTTPS to access application

Answered
0
0

Hi.

I have deployed my first Wisej app (the first couple of forms, anyway) to the cloud… YAY! 🙂

I am now trying to force HTTPS to access it from the browsers. One technique I usually use and is working fine in all other websites is to add a <rewrite> to the web.config telling it to use a “rewriteRules.config” to Redirect the URL to “https://” in case it got there through a “http://” url. It looks like this:

In the web.config, inside <system.webServer>:


    
        
    

And then, the rewriteRules.config file will have:



    
        
        
            
        
        
    


However, I get the following error:
wisej.js?v=2.2.4.0:65923 WebSocket connection to ‘wss://demo.mysite.net/app.wx?url=https://demo.mysite.net/&sid=b07fdseb-eb75-2231-3444e-56c223455a0cd’ failed: Error during WebSocket handshake: Unexpected response code: 200

I guess WebSocket is the key word here.

So, would you guys know what would be the proper way to force HTTPS in a Wisej application?

Thanks in advance.

Ivan

  • Ivan Borges
    Guess I didn’t format the properly… Here it goes, no formatting: In web.config: In rewriteRules.config:
  • Ivan Borges
    Oh dear… not sure what is going on. . . . . . . . . . . . .
  • Ivan Borges
    OK, I give up.
  • You must to post comments
Best Answer
1
0

Wisej connects to wss:// when the url is https:// because it mandatory or the browser will not allow a ws:// connection over https:///

The rewrite rule probably messes it up since it’s only for http. In Wisej it’s a lot simpler, simply add

“secure”: true

in Default.json

It should be document and commented in Default.json already.

  • You must to post comments
0
0

Hi Luca.

Wow, that was quick. And easy!
Thank you so much, it worked like a charm.
And it is documented, my bad.

Cheers.

Ivan

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.