Giter Site home page Giter Site logo

Reverse Proxy about n8n HOT 15 CLOSED

n8n-io avatar n8n-io commented on May 4, 2024 1
Reverse Proxy

from n8n.

Comments (15)

cadecairos avatar cadecairos commented on May 4, 2024 16

Forget that, found a helpful thread on server-sent events and nginx

I added proxy_buffering off;, proxy_cache off;, proxy_http_version 1.1;, chunked_transfer_encoding off;, and proxy_set_header Connection ''; and now the web UI is working in Firefox.

in case you need it, I launched n8n like so:

docker run -d -p 5678:5678 -v ~/.n8n:/root/.n8n -e N8N_BASIC_AUTH_ACTIVE=true -e N8N_BASIC_AUTH_PASSWORD=$N8N_PASS -e N8N_BASIC_AUTH_USER=$N8N_USER -e N8N_HOST=$N8N_HOST -e N8N_PROTOCOL=$N8N_PROTO -e VUE_APP_URL_BASE_API=$N8N_VUE_URL_BASE_API -e WEBHOOK_TUNNEL_URL=$N8N_WEBHOOK_TUNNEL_URL --name n8n  n8nio/n8n:0.23.0

from n8n.

janober avatar janober commented on May 4, 2024 4

@lmariscal to change the URL of only the webhook set the environment variable:

That sets the webhook URL (totally ignoring what is in N8N_HOST and N8N_PORT)

WEBHOOK_TUNNEL_URL="https://example.com/"

from n8n.

markusobi0 avatar markusobi0 commented on May 4, 2024 3

In the top right corner.
https://imgur.com/Gv4JFRp

from n8n.

markusobi0 avatar markusobi0 commented on May 4, 2024 1

No, it doesn't. Now is the Tunnl URL Section completly gone and on the Panel is the "Connection Lost" back.

from n8n.

janober avatar janober commented on May 4, 2024

What you described should work. But I just checked and it seems like there is some documentation missing. Very sorry about that. Will try to add it asap.

For now make sure to set the following environment variables that everything knows how to connect:

N8N_HOST="example.com"
N8N_PROTOCOL="https"
N8N_PORT="443"
VUE_APP_URL_BASE_API="https://example.com/"
WEBHOOK_TUNNEL_URL="https://example.com/"

from n8n.

markusobi0 avatar markusobi0 commented on May 4, 2024

Now I'm slightly confused. How should I configure Nginx then, when n8n already blocks Port 443?

from n8n.

janober avatar janober commented on May 4, 2024

Ah, you can also choose a different port. I just wanted to show you the available environment variables. Choose whatever port you want. Just make sure all the above ones are set accordingly.

from n8n.

markusobi0 avatar markusobi0 commented on May 4, 2024

If I understand this right, the environment variable WEBHOOK_TUNNEL_URL should replace the Tunnel URL which is shown while n8n starts. If it is that way, I'm doing something wrong, because i get still a *.hooks.n8n.cloud Domain, while n8n starts.

from n8n.

janober avatar janober commented on May 4, 2024

Yes that is correct. You then just have to remove the "--tunnel" and it should display you the correct URLs in the nodes.

from n8n.

janober avatar janober commented on May 4, 2024

Yes,, the tunnel-section on startup gets only displayed when the n8n tunnel gets used.

What do you mean with "Connection Lost"? In the top right corner of the page? That informs about if the connection via EventSource is established to display updates about what is currently executing. So it is not webhook related. You can check in the Console or Network-Pane to see to where it tries to connect. Maybe that helps you.

Does it display the connection issue from the start or after a while?

from n8n.

markusobi0 avatar markusobi0 commented on May 4, 2024

From the Start

from n8n.

janober avatar janober commented on May 4, 2024

And the where does the "Connection Lost" get displayed? In the top right corner or do you mean something else?

from n8n.

cadecairos avatar cadecairos commented on May 4, 2024

Shot in the dark here, but are you seeing this error on Firefox?

I think this is the implementation of server sent events being broken in Firefox, because for me it's working in Chromium and not FX (Developer edition).

from n8n.

lmariscal avatar lmariscal commented on May 4, 2024

The N8N_HOST does change the host value but in the webhook urls it still shows the port behind the proxy. N8N_PORT wouldn't solve this issue as I do want that port to be used at serving the server behind the proxy but I don't want it in my webhooks.

from n8n.

janober avatar janober commented on May 4, 2024

I hope that did answer your questions. If not you can follow up anytime. Close the issue for now.

from n8n.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.