Coder Social home page Coder Social logo

Fix CORS issues about kino HOT 5 CLOSED

beaufortfrancois avatar beaufortfrancois commented on May 24, 2024
Fix CORS issues

from kino.

Comments (5)

derekherman avatar derekherman commented on May 24, 2024 1

@beaufortfrancois We were looking at this yesterday and seeing some odd behavior during SW registration. I think @dero said he was going to look into it some more but not sure if he’s gotten to it yet.

from kino.

beaufortfrancois avatar beaufortfrancois commented on May 24, 2024 1

Perfect. Thank you! You can close this issue.

from kino.

beaufortfrancois avatar beaufortfrancois commented on May 24, 2024

I think it applies to all files listed in

kino/src/js/sw/cache.js

Lines 34 to 39 in 05cb0f5

'https://storage.googleapis.com/kino-assets/single-video/thumbnail.png',
'https://storage.googleapis.com/kino-assets/multiple-sources/thumbnail.png',
'https://storage.googleapis.com/kino-assets/using-webvtt/thumbnail.png',
'https://storage.googleapis.com/kino-assets/streaming-basics/thumbnail.png',
'https://storage.googleapis.com/kino-assets/efficient-formats/thumbnail.png',
'https://storage.googleapis.com/kino-assets/adaptive-streaming/thumbnail.png',

from kino.

beaufortfrancois avatar beaufortfrancois commented on May 24, 2024

@derekherman @dero Can you have a look at this issue?

from kino.

dero avatar dero commented on May 24, 2024

@beaufortfrancois @derekherman I was able to confirm the issue earlier. Then we re-ran the script that sets CORS headers on the static bucket items.

I've since re-checked the issue and the bottom line is that the issue seems now resolved after the recent re-run of the CORS script.

I've unregistered the SW and let it re-cache all static items and then checked the response headers for the bucket items. The origin request header is properly sent and the access-control-allow-origin response header is returned as expected with the correct value.

image

I tested everything using curl, just for good measure:

curl https://storage.googleapis.com/kino-assets/streaming-basics/thumbnail.png --header "Origin: https://kinoweb.dev" --dump-header headers.txt > /dev/null

And the returned headers again contained the expected access-control-allow-origin:

HTTP/2 200
x-guploader-uploadid: ADPycdsj-0EfRilYsL6s0lFT9kYdOpUOC6sMHlSS8XDZk2syXLv8Ss3MRrAmy9hoOAfxLfHtZXFEk7omu9uZ8_zqKS0hcLa2lA
expires: Mon, 20 Sep 2021 09:06:45 GMT
date: Mon, 20 Sep 2021 08:06:45 GMT
last-modified: Sun, 23 May 2021 00:42:24 GMT
etag: "733b52179f4df28c3d45d111668cec49"
x-goog-generation: 1621730544499387
x-goog-metageneration: 1
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 66782
content-type: image/png
x-goog-hash: crc32c=ezuiZg==
x-goog-hash: md5=cztSF59N8ow9RdERZozsSQ==
x-goog-storage-class: STANDARD
accept-ranges: bytes
content-length: 66782
access-control-allow-origin: https://kinoweb.dev
access-control-expose-headers: Accept-Ranges, Content-Length, Content-Type, Date, Origin, Range, Server, Transfer-Encoding, X-GUploader-UploadID, X-Google-Trace
vary: Origin
server: UploadServer
cache-control: public, max-age=3600
age: 0
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"

Unless we can reproduce the issue, I would consider this resolved.

from kino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.