# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 196302
# self = https://watcher.sour.is?offset=164925
# next = https://watcher.sour.is?offset=165025
# prev = https://watcher.sour.is?offset=164825
@prologic Haha, my brain thought, that loopback address is missing a zero. :-D
[Interview with Senior JS Developer 2024 [NEW] - YouTube](https://www.youtube.com/watch?v=aWfYxg-Ypm4) Bahahahahaha 🀣 So funny!
[Interview with Senior JS Developer 2024 [NEW] - YouTube](https://www.youtube.com/watch?v=aWfYxg-Ypm4) Bahahahahaha 🀣 So funny!
@lyse 10s rule? πŸ€”
@lyse 10s rule? πŸ€”
Oh come on. The waffle fell off the plate and hit the door and then the floor. Of course with the apple sauce side each.
@movq True! Complexity Budget πŸ‘Œ
@movq True! Complexity Budget πŸ‘Œ
Creator of HTMX Talks HTMX - YouTube
Creator of HTMX Talks HTMX - YouTube
@prologic And it won’t be the last. πŸ˜… It’s inevitable at this level of complexity …
@prologic And it won’t be the last. πŸ˜… It’s inevitable at this level of complexity …
@prologic And it won’t be the last. πŸ˜… It’s inevitable at this level of complexity …
@prologic And it won’t be the last. πŸ˜… It’s inevitable at this level of complexity …
@eldersnake No worries! Any time πŸ€— Sorry it took this long to sort out, I'm not happy about how we did it (_work around et all_) but yeah if that's what we have to do, so be it 🀣
@eldersnake No worries! Any time πŸ€— Sorry it took this long to sort out, I'm not happy about how we did it (_work around et all_) but yeah if that's what we have to do, so be it 🀣
@movq Oh come now, this isn't the first Browser bug we've seen right? πŸ˜…
@movq Oh come now, this isn't the first Browser bug we've seen right? πŸ˜…
@prologic Yes very very strange! I truly don't know where to start on that one 🀣 Must be one of those really weird edge cases. Thanks for your help on this, I can at least post normally now.πŸ‘Œ

I'll check logging in etc tomorrow, time for bed lol 😴
@prologic I’ll grab my popcorn. 🍿
@prologic I’ll grab my popcorn. 🍿
@prologic I’ll grab my popcorn. 🍿
@prologic I’ll grab my popcorn. 🍿
@eldersnake Good good πŸ‘
@eldersnake Good good πŸ‘
@eldersnake But not me against your pod, so that's even weirder right? πŸ€”
@eldersnake But not me against your pod, so that's even weirder right? πŸ€”
Test

EDIT: Okay, convo works properly now at least
@prologic It's weird though cos I could reproduce it on any of my browsers on either my laptop or phone πŸ€”
@movq You wouldn't believe it, but I'm pretty sure @eldersnake and I found a nasty little bug in Firefox 126.0.1 🀣
@movq You wouldn't believe it, but I'm pretty sure @eldersnake and I found a nasty little bug in Firefox 126.0.1 🀣
Lot of testing going on here today. 🀣
Lot of testing going on here today. 🀣
Lot of testing going on here today. 🀣
Lot of testing going on here today. 🀣
@eldersnake I just installed 127.0.1 (64-bit) tonight and tested and it worked just fine. Try upgrading and roll that commit back and see if it still repros? πŸ€” I'm almost willing to bet this is a bug πŸ›
@eldersnake I just installed 127.0.1 (64-bit) tonight and tested and it worked just fine. Try upgrading and roll that commit back and see if it still repros? πŸ€” I'm almost willing to bet this is a bug πŸ›
@prologic Firefox 126.0.1 is my primary
@eldersnake Test
@eldersnake Test
What browser and version is this btw? Not sure if you mentioned?
What browser and version is this btw? Not sure if you mentioned?
@eldersnake Fuck'n hell 🀣 This has to be a browser bug!
@eldersnake Fuck'n hell 🀣 This has to be a browser bug!
@prologic Fix works!
Test
@eldersnake Looks legit πŸ‘Œ
@eldersnake Looks legit πŸ‘Œ
Okay just pushed:


* aa2f3ae9 - (HEAD -> main, origin/main) Workaround for this invalid Referer BS (6 seconds ago) <James Mills>
Okay just pushed:


* aa2f3ae9 - (HEAD -> main, origin/main) Workaround for this invalid Referer BS (6 seconds ago) <James Mills>
@prologic Woops my blockquote got mangled but you get the gist haha
@prologic I was wondering if my reverse proxy could cause something but it's pretty standard...


>server {
listen 80;
server_name we.loveprivacy.club;

location / {
return 301 https://$host$request_uri;
#proxy_pass http://127.0.0.1:8000;
}
}
server {
listen 443 ssl http2;
server_name we.loveprivacy.club;

ssl_certificate /etc/letsencrypt/live/we.loveprivacy.club/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/we.loveprivacy.club/privkey.pem;

client_max_body_size 8M;

location / {
proxy_pass http://127.0.0.1:8000;
}
}


>
Should I just code in a work-around? If the Referer is /post then consider that total bullshit, and ignore? πŸ€”
Should I just code in a work-around? If the Referer is /post then consider that total bullshit, and ignore? πŸ€”
Why would a Web Browser set the Referer header incorrectly?! πŸ€”
Why would a Web Browser set the Referer header incorrectly?! πŸ€”
Can't reproduce with Iridium either.
Can't reproduce with Iridium either.
Can't reproduce with Firefox.
Can't reproduce with Firefox.
Test
A initial post, reply and conv -> post (_bottom of page_) and nothing πŸ€” All 6 requests are POST /post followed by a GET <from> where ever I was coming from. Hmmm 🧐 This is nuts 🌰
A initial post, reply and conv -> post (_bottom of page_) and nothing πŸ€” All 6 requests are POST /post followed by a GET <from> where ever I was coming from. Hmmm 🧐 This is nuts 🌰
Test
Test
Test
Test
Test
Test
@eldersnake Yeah no worries!

You can see here, at least, htmx knows what the current URL is:


HX-Current-URL: https://we.loveprivacy.club/conv/vcpt7gq
Referer: https://we.loveprivacy.club/post


But the freak'n browser is setting the wrong value for Referer. There is simply no way to be on the /post endpoint normally anyway.
@eldersnake Yeah no worries!

You can see here, at least, htmx knows what the current URL is:


HX-Current-URL: https://we.loveprivacy.club/conv/vcpt7gq
Referer: https://we.loveprivacy.club/post


But the freak'n browser is setting the wrong value for Referer. There is simply no way to be on the /post endpoint normally anyway.
@prologic Firefox but it happens on Brave and Chromium on my laptop, or any browser (Brave, Chromium, Vanadium) I try on my Android phone.
What Browser is this again? Does it happen with any other browser?
What Browser is this again? Does it happen with any other browser?
@prologic Sorry, my messages don't get included in the current convo unless I tag you. Guess something gets lossed in translation with this weird posting issue. ANYWAY, it is rather perplexing. Clearly only an issue on my Pod, but what could the source of it be πŸ€”
Easy: 5.00 miles, 00:09:14 average pace, 00:46:11 duration
kept it in zone 2 pretty well
#running #treadmill
Easy: 5.00 miles, 00:09:14 average pace, 00:46:11 duration
kept it in zone 2 pretty well
#running #treadmill
Easy: 5.00 miles, 00:09:14 average pace, 00:46:11 duration
kept it in zone 2 pretty well
#running #treadmill
@eldersnake Ahh missed this. Fuck, that's just silliness and not right. wtf?!
@eldersnake Ahh missed this. Fuck, that's just silliness and not right. wtf?!
The POST /post XHR (_that is being run by htmx_) should never, ever be Referer: .../post πŸ€¦β€β™‚οΈ
The POST /post XHR (_that is being run by htmx_) should never, ever be Referer: .../post πŸ€¦β€β™‚οΈ
For example, this is what you *should* see:
For example, this is what you *should* see:
Yeah sorry just realised, but just checked again and the referrer is the same (/post) on either the POST or the GET πŸ€”
@eldersnake I mean on the POST /post request itself. That's the Referer that's looked up and used as the redirect.
@eldersnake I mean on the POST /post request itself. That's the Referer that's looked up and used as the redirect.
Testing
Indeed /post is referrer...

>GET /post HTTP/2
Host: we.loveprivacy.club
[...]
HX-Request: true
HX-Target: content
HX-Current-URL: https://we.loveprivacy.club/conv/vcpt7gq
Referer: https://we.loveprivacy.club/post
>
@prologic Okay lemme see
The only way this is possible is if the Referrer is /post and not / or /discover like it should be. Can we confirm/deny this if you inspect the POST /post requests? πŸ€”

See this code

g
if htmx.IsHTMX(r) {
  htmx.NewResponse().
  Location(RedirectRefererURL(r, s.config, "/")).
  Write(w)
} else {
  http.Redirect(w, r, RedirectRefererURL(r, s.config, "/"), http.StatusFound)
}
The only way this is possible is if the Referrer is /post and not / or /discover like it should be. Can we confirm/deny this if you inspect the POST /post requests? πŸ€”

See this code

g
\t\tif htmx.IsHTMX(r) {
\t\t\thtmx.NewResponse().
\t\t\t\tLocation(RedirectRefererURL(r, s.config, "/")).
\t\t\t\tWrite(w)
\t\t} else {
\t\t\thttp.Redirect(w, r, RedirectRefererURL(r, s.config, "/"), http.StatusFound)
\t\t}
The only way this is possible is if the Referrer is /post and not / or /discover like it should be. Can we confirm/deny this if you inspect the POST /post requests? πŸ€”

See this code

g
if htmx.IsHTMX(r) {
  htmx.NewResponse().
  Location(RedirectRefererURL(r, s.config, "/")).
  Write(w)
} else {
  http.Redirect(w, r, RedirectRefererURL(r, s.config, "/"), http.StatusFound)
}
There is only one explanation for this... Lemme see...
There is only one explanation for this... Lemme see...
Let's focus on this ☝️ how in da fuq is this happenning?!
Let's focus on this ☝️ how in da fuq is this happenning?!
@eldersnake LOL all good. Feel free to use https://gist.mills.io πŸ‘Œ
@eldersnake LOL all good. Feel free to use https://gist.mills.io πŸ‘Œ
@eldersnake Holy fuck?! That's unpossible?!