Conversation
Notices
-
(mint@ryona.agency)'s status on Friday, 04-Aug-2023 08:32:50 JST >POST /users/mint_2/inbox HTTP/1.1" 400 24
Apparently, users' inboxes are broken due to my caching setup, which breaks subscriptions. Investigating.-
(mint@ryona.agency)'s status on Friday, 04-Aug-2023 09:15:15 JST Disabled the user profile caching for now. Couldn't figure out how to match the location block so that inboxes would bypass cache in its entirety, and the fact that frontend uses /users/ with its flake IDs doesn't help either. Machismo repeated this. -
(mint@ryona.agency)'s status on Friday, 04-Aug-2023 21:56:33 JST Never realized nginx can do nested location blocks. That's a gamechanger.
https://nginx.org/en/docs/http/ngx_http_core_module.html#locationMachismo repeated this. -
New Janny in Town (mk2boogaloo@lab.nyanide.com)'s status on Friday, 04-Aug-2023 21:59:39 JST New Janny in Town @mint skill issue? In conversation permalink Machismo repeated this. -
(mint@ryona.agency)'s status on Friday, 04-Aug-2023 21:59:39 JST @MK2boogaloo Perhaps. In conversation permalink -
(mint@ryona.agency)'s status on Friday, 04-Aug-2023 22:07:45 JST try_files doesn't work in if block :lainsuicide: In conversation permalink -
Machismo (zerglingman@freespeechextremist.com)'s status on Friday, 04-Aug-2023 22:09:02 JST Machismo @mint if is evil inside location. In conversation permalink -
(mint@ryona.agency)'s status on Friday, 04-Aug-2023 22:12:09 JST @Zerglingman How else I'm supposed to return frontend HTML to browsers instead of AP object? In conversation permalink Machismo likes this. -
Machismo (zerglingman@freespeechextremist.com)'s status on Friday, 04-Aug-2023 22:14:38 JST Machismo @mint idk, isn't upstream meant to handle that? In conversation permalink -
(mint@ryona.agency)'s status on Friday, 04-Aug-2023 22:19:02 JST @Zerglingman It does, but due to my setup I prefer to handle everything static via nginx. In conversation permalink Machismo likes this. -
Machismo (zerglingman@freespeechextremist.com)'s status on Friday, 04-Aug-2023 22:20:02 JST Machismo @mint Then abuse variables. In conversation permalink -
(mint@ryona.agency)'s status on Friday, 04-Aug-2023 22:25:08 JST rewrite without redirect or scheme does the same thing :wereback: In conversation permalink -
(mint@ryona.agency)'s status on Friday, 04-Aug-2023 22:32:03 JST @Zerglingman I've already figured it out, rewrite does the same thing unless you specifically tell it to redirect. In conversation permalink Machismo likes this. -
(mint@ryona.agency)'s status on Friday, 04-Aug-2023 22:39:38 JST @Zerglingman Something is rewriting Host headers.
13:36:00.621 request_id=F3gxkWVY7ydZSq0AAAlh [debug] Sigstring: (request-target): post /users/notmint/inbox content-length: 503 date: Fri, 04 Aug 2023 13:36:57 GMT digest: SHA-256=jleAcs04C1AzMc2FFBTtggSDljuXNO181/boHjoZ3a0= host: pleromerIn conversation permalink Machismo likes this.Machismo repeated this. -
(mint@ryona.agency)'s status on Friday, 04-Aug-2023 22:46:14 JST @Zerglingman Yeah, had to add another proxy_set_header. No idea why the one from the server block isn't getting picked up. Final setup for caching AP actors is something like this:
```
location ~ ^/(relay|internal\/fetch|users\/([A-z0-9_-].*))$ {
if ($http_accept ~* "html") {
rewrite ^(.*) /index.html;
}
location ~ ^/(relay|internal\/fetch|users\/([A-z0-9_-].*))\/inbox$ {
proxy_set_header Host $http_host;
proxy_pass http://pleromer;
}
proxy_cache plague_users;
proxy_cache_key $request_uri;
add_header x-cache "$upstream_cache_status from nginx";
proxy_ignore_headers "Cache-Control";
proxy_pass http://pleromer;
proxy_buffering on;
proxy_set_header Accept "application/activity+json";
}
```In conversation permalink Attachments
-