perlsky is a Perl 5 implementation of an AT Protocol Personal Data Server.
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

Allow cross-origin blob fetches for browser clients

alice 012d7122 6df600da

+3
+1
lib/ATProto/PDS/API/Sync.pm
··· 113 113 my $bytes = <$fh>; 114 114 close($fh); 115 115 $c->res->headers->content_type($blob->{mime_type} || 'application/octet-stream'); 116 + $c->res->headers->header('Cross-Origin-Resource-Policy' => 'cross-origin'); 116 117 $c->observe_blob_egress($blob->{mime_type}, length($bytes)); 117 118 $c->render(data => $bytes); 118 119 return;
+2
t/external-surface.t
··· 117 117 did => $did, 118 118 cid => $blob_cid, 119 119 ))->status_is(200) 120 + ->header_is('Cross-Origin-Resource-Policy' => 'cross-origin') 120 121 ->content_type_is('text/plain') 121 122 ->content_is('blob-bytes'); 122 123 ··· 150 151 did => $second_did, 151 152 cid => $blob_cid, 152 153 ))->status_is(200) 154 + ->header_is('Cross-Origin-Resource-Policy' => 'cross-origin') 153 155 ->content_type_is('text/plain') 154 156 ->content_is('blob-bytes'); 155 157