Skip to content Skip to sidebar Skip to footer

Why Doesn't Xmlhttprequest Payload Reach Node.js Server After Moving To Https?

For my hobby project, I've been trying to convert a webpage to HTTPS completely. The webpage consists of: An apache server hosting the HTML / JS / CSS A Node.JS http server handli

Solution 1:

I had an entire answer here, including a fix I thought I found, but sadly, it doesn't work. So instead, I'll just answer my original question: Why does this happen.

It's simple really: I'm using RewriteRule to rewrite the urls in case they're missing the trailing slash. Sadly, this doesn't support POST data, which I require. Since this was a broad question, focused on the why, I'm gonna mark this answer as conclusive, and open a new question that's specific on how to modify the url to include the trailing slash without removing the POST data. I'll post a link here when it's up.

EDIT:

I've already solved my new question. Turns out all you need to do is make sure that RewriteRule uses HTTP code 307. More detail in the other question: How to rewrite a URL while keeping POST data?

Post a Comment for "Why Doesn't Xmlhttprequest Payload Reach Node.js Server After Moving To Https?"