• 0 Posts
  • 28 Comments
Joined 1 year ago
cake
Cake day: June 16th, 2023

help-circle

















  • which suggests a lookup table

    No, it only suggests an additional field in the Post table

    since there’s no assurance that any instance is aware of any other instance

    It already works like that, but slightly worse because post IDs aren’t the same across instances. If you search a newly-created community from another instance here, you just won’t find it until it’s synced, despite its URI being unique.

    Thinking about it, it would be possible to have an URI for posts like post:${id}@instance.com, similar to how user URIs and community URIs are made. This way, you could open /post/1772651 on lemmy.world or post:1772651@lemmy.world on, idk, lemmy.blahaj.zone or something.



  • Hi! I noticed an issue with the headers sent by Lemmy.world.

    Headers sent from and to this website’s official UI look like this:

    HTTP/1.1 200 OK
    server: nginx/1.18.0 (Ubuntu)
    date: Fri, 07 Jul 2023 23:35:17 GMT
    content-type: application/json
    vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers
    content-encoding: gzip
    access-control-allow-origin: *
    access-control-allow-methods: GET, POST, PUT, OPTIONS
    access-control-allow-headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range
    access-control-expose-headers: content-encoding, content-type, vary, Content-Length,Content-Range
    X-Firefox-Spdy: h2
    

    Which is fine. However, headers received by custom clients look like this:

    HTTP/2 200 OK
    server: nginx/1.18.0 (Ubuntu)
    date: Fri, 07 Jul 2023 23:33:50 GMT
    content-type: application/json
    vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers
    content-encoding: gzip
    access-control-allow-origin: https://natoboram.github.io
    access-control-expose-headers: content-encoding, access-control-allow-origin, content-type, vary
    access-control-allow-origin: *
    access-control-allow-methods: GET, POST, PUT, OPTIONS
    access-control-allow-headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range
    access-control-expose-headers: Content-Length,Content-Range
    X-Firefox-Spdy: h2
    

    There’s two access-control-allow-origin! This still breaks web clients.