node-red / node-red/node-red-nodes

node-red-node-emoncms http 302 response

Open
#524 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
13h 57m
Merged PRs (30d)
3

Description

I have set up my local emoncms server to use https and forward all http traffic.
The node-red node does not seem to like this very much.
Following error is given (http 302):

{"payload":"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>302 Found</title>\n</head><body>\n<h1>Found</h1>\n<p>The document has moved <a href=\"https://xxx/input/post.json?json=%7BH/Cstatus:1%7D&amp;node=4&amp;apikey=XXX\">here</a>.</p>\n<hr>\n<address>Apache/2.4.29 (Ubuntu) Server at XXX.be Port 80</address>\n</body></html>\n","_msgid":"86eff4cf.145f58","urlsent":"http:/xxx/input/post.json?json={H/Cstatus:1}&node=4&apikey=XXX","topic":"http response","rc":302,"warning":"ERROR: API Call Failed"}

When i paste the url manually in a browser it returns 'OK', so it's the node that's not handling the redirection properly? Can i work my way around this in some way in apache without the need to adjust something on the node-red side? I have a lot of offsite devices, so adjusted these would be impossible.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by locating the node-red-node-emoncms HTTP request path and checking how it handles the reported 302 response. Done means the emoncms request works when HTTP traffic is redirected to HTTPS, without requiring changes to the offsite devices.

Written by the indexing model from the issue text.

Assessment

Tech stack
apache, javascript
Domain
api, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.