Git Product home page Git Product logo

Comments (4)

henkisdabro avatar henkisdabro commented on September 24, 2024 1

Reviving this old thread as I think it is an awesome idea, and thanks @pmeenan for the contributions. As I just deployed this and testing it, I'm getting an error on the Google Fonts CSS request, it seems to set the paths to src: url(/workers/scriptproxy/https/fonts.gstatic.com/s/rubik/v14/iJWbBXyIfDnIV7nEt3KSJbVDV49rz8sDE0Uw.ttf) where my PROXY_PREFIX is set to /workers/scriptproxy/ in this case. See the misconfigured paths it has set there, which then again feeds into the worker into a loop and generates a long URL with the wrong hostname tripled :-) Is that something that can be adjusted easily? Perhaps Google Fonts has changed recently?

from templates.

pmeenan avatar pmeenan commented on September 24, 2024

This should do it: https://github.com/pmeenan/cf-workers/tree/master/streaming-optimizations

Let me know if you bump into any issues but it should have the latest streaming logic from the font worker with the script proxy code added. Main change to the processing is to the logic that makes sure a chunk doesn't split a link tag in half (now generically checks for all tags).

It's restructured a bit as well to allow for hooking in other rewriters (expect to see more coming soon, particularly to the non-streaming version).

from templates.

ahmed-sigmalux avatar ahmed-sigmalux commented on September 24, 2024

Big thanks, @pmeenan !!!

from templates.

lauragift21 avatar lauragift21 commented on September 24, 2024

Closing this issue as it looks like the original issue was resolved, and the templates no longer live here and have moved to the workers-sdk monorepo located here: https://github.com/cloudflare/workers-sdk/tree/main/templates

from templates.

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.