diff --git a/Docs/Content/self-hosted/sendgrid-inbound-email.md b/Docs/Content/self-hosted/sendgrid-inbound-email.md index 243485759a..002c6def70 100644 --- a/Docs/Content/self-hosted/sendgrid-inbound-email.md +++ b/Docs/Content/self-hosted/sendgrid-inbound-email.md @@ -64,7 +64,7 @@ For better deliverability and to avoid emails being marked as spam: | Field | Value | |-------|-------| | **Receiving Domain** | Your inbound subdomain (e.g., `inbound.yourdomain.com`) | -| **Destination URL** | `https://your-oneuptime-domain.com/probe-ingest/incoming-email/webhook` | +| **Destination URL** | `https://your-oneuptime-domain.com/incoming-email/webhook` | | **Check incoming emails for spam** | Optional - enable if desired | | **Send raw, full MIME message** | Leave unchecked (not required) | | **POST the raw, full MIME message** | Leave unchecked (not required) | @@ -185,7 +185,7 @@ Use "Email Received" criteria to ensure you receive periodic emails: 1. **Ensure OneUptime is publicly accessible:** - The webhook URL must be reachable from the internet - - Test with: `curl -X POST https://your-oneuptime-domain.com/probe-ingest/incoming-email/webhook` + - Test with: `curl -X POST https://your-oneuptime-domain.com/incoming-email/webhook` 2. **Check firewall rules:** - Allow incoming HTTPS traffic from SendGrid's IP ranges diff --git a/Nginx/default.conf.template b/Nginx/default.conf.template index 2165567164..d02282a2a8 100644 --- a/Nginx/default.conf.template +++ b/Nginx/default.conf.template @@ -867,12 +867,12 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE} location /heartbeat { - # This is for nginx not to crash when service is not available. + # This is for nginx not to crash when service is not available. resolver 127.0.0.1 valid=30s; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Proto $scheme; # enable WebSockets (for ws://sockjs not connected error in the accounts source: https://stackoverflow.com/questions/41381444/websocket-connection-failed-error-during-websocket-handshake-unexpected-respon) proxy_http_version 1.1; @@ -883,6 +883,22 @@ ${PROVISION_SSL_CERTIFICATE_KEY_DIRECTIVE} client_max_body_size 50M; } + location /incoming-email { + # Incoming Email Monitor webhook endpoint + resolver 127.0.0.1 valid=30s; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_pass http://probe-ingest/incoming-email; + + client_max_body_size 50M; + } + location /workflow { # This is for nginx not to crash when service is not available.