-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add inbox to nginx.conf backend routes #71
Conversation
@@ -77,7 +77,7 @@ server { | |||
} | |||
|
|||
# backend | |||
location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) { | |||
location ~ ^/(api|pictrs|feeds|inbox|nodeinfo|.well-known) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nutomic Is this one necessary? Wouldn't federation be not working anywhere if this was required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure if this change helps or hurts, but I can at least confirm that federation is not working the way I'd expect it to on the instance I set up recently using this repo. The main issue is comment syncing, in that most comments that are visible on other instances are not visible on my own instance when I visit a post.
There's more info here about comment sync problems that I and others have been experiencing: https://lemmy.ml/post/1148327?scrollToComments=true
...This change does definitely break the lemmy-ui /inbox
page, though. But I'm seeing a lot more traffic on that route in the nginx log than just me navigating to the notifications page in my browser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's an example of traffic logged by nginx when I visit my-lemmy-domain.com/inbox
in a browser:
[my ip address] - - [05/Jun/2023:15:51:14 +0000] "GET /inbox HTTP/2.0" 404 0 "-" "Mozilla/5.0 [my user-agent]..."
[my ip address] - - [05/Jun/2023:15:51:14 +0000] "GET /inbox HTTP/2.0" 404 0 "-" "Mozilla/5.0 [my user-agent]..."
Here's an example of traffic that occurs regularly, with a variety of IPs and user-agent strings, most of which include either "lemmy.ml" or "mastodon.social", that made me think this traffic was probably not meant for the frontend:
[a datacenter ip address] - - [05/Jun/2023:15:50:42 +0000] "POST /inbox HTTP/1.1" 400 0 "-" "http.rb/5.1.1 (Mastodon/4.1.2+nightly-20230523; +https://mastodon.social/)"
[a datacenter ip address] - - [05/Jun/2023:15:50:42 +0000] "POST /inbox HTTP/1.1" 400 0 "-" "http.rb/5.1.1 (Mastodon/4.1.2+nightly-20230523; +https://mastodon.social/)"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, one more comment: I can see now that the comment syncing behavior is probably not related to this. LemmyNet/lemmy#2825
But I am still wondering why I'm seeing so much traffic on the /inbox
route for an instance where I am currently the only registered user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep this is already handled by $request_method = POST
above. The inbox is where incoming federation actions from other servers are received (as POST requests).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I take it that means this PR isn't necessary then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing this to request changes, because it breaks the front end inbox route.
Yes this can be closed. |
I can see in the nginx log that requests are being sent to an
/inbox
route, and it looks like these requests ought to be directed to the backend. This PR makes a small change to nginx.conf to make this happen by default.See https://lemmy.ml/post/1148327?scrollToComments=true