Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Once we decoded the incoming access token we can then read the R2 key value e.g. `/cdn-keys/c7ce447c-f5e6-4f13-87b8-d3051ba3fc45/c7de111c-f5g9-4f13-87b8-d1267ba3ge95` and then check the user-sent `privateKey` against the hash stored there. For subsequent requests, the same cache logic as for the legacy tokens is reused. The UI part was pretty straight-forward and less challenging to build, however it was still part of this project. The new token overview: ![All good](https://the-guild.dev/blog-assets/how-we-shipped-cdn-access-tokens-with-cloudflare-workers-and-r2/phase-4-cdn-access-token-overview.png) Creating a new token: ![All good](https://the-guild.dev/blog-assets/how-we-shipped-cdn-access-tokens-with-cloudflare-workers-and-r2/phase-4-token-create-form.png) We successfully deployed this to production and then informed all our clients that are waiting for this feature. 🎉 In addition, this is of course now also available for the self-hosted Hive users. ## Conclusion This was an exciting and challenging project to solve and Cloudflare provides useful tools for solving these kinds of problems. On the other hand debugging Cloudflare tooling is often frustrating and cumbersome, documentation is also often scarce or non-existing for more advanced use-cases. Nevertheless, we are happy to finish this project successfully and are looking forward to all the future challenges! In case you did not know, Hive is fully open-source and self-hostable! You can find all the code, steps and pull requests on GitHub! * https://github.com/kamilkisiela/graphql-hive/pull/1003 * https://github.com/kamilkisiela/graphql-hive/pull/1043 * https://github.com/kamilkisiela/graphql-hive/pull/1005 * https://github.com/kamilkisiela/graphql-hive/pull/1114 * https://github.com/kamilkisiela/graphql-hive/pull/1120 * https://github.com/kamilkisiela/graphql-hive/pull/1127 * https://github.com/kamilkisiela/graphql-hive/pull/1130 * https://github.com/kamilkisiela/graphql-hive/pull/1142 * https://github.com/kamilkisiela/graphql-hive/pull/1143 * https://github.com/kamilkisiela/graphql-hive/pull/1061
Once we decoded the incoming access token we can then read the R2 key value e.g. `/cdn-keys/c7ce447c-f5e6-4f13-87b8-d3051ba3fc45/c7de111c-f5g9-4f13-87b8-d1267ba3ge95` and then check the user-sent `privateKey` against the hash stored there. For subsequent requests, the same cache logic as for the legacy tokens is reused. The UI part was pretty straight-forward and less challenging to build, however it was still part of this project. The new token overview: ![All good](https://the-guild.dev/blog-assets/how-we-shipped-cdn-access-tokens-with-cloudflare-workers-and-r2/phase-4-cdn-access-token-overview.png) Creating a new token: ![All good](https://the-guild.dev/blog-assets/how-we-shipped-cdn-access-tokens-with-cloudflare-workers-and-r2/phase-4-token-create-form.png) We successfully deployed this to production and then informed all our clients that are waiting for this feature. 🎉 In addition, this is of course now also available for the self-hosted Hive users. ## Conclusion This was an exciting and challenging project to solve and Cloudflare provides useful tools for solving these kinds of problems. On the other hand debugging Cloudflare tooling is often frustrating and cumbersome, documentation is also often scarce or non-existing for more advanced use-cases. Nevertheless, we are happy to finish this project successfully and are looking forward to all the future challenges! In case you did not know, Hive is fully open-source and self-hostable! You can find all the code, steps and pull requests on GitHub! * https://github.com/kamilkisiela/graphql-hive/pull/1003 * https://github.com/kamilkisiela/graphql-hive/pull/1043 * https://github.com/kamilkisiela/graphql-hive/pull/1005 * https://github.com/kamilkisiela/graphql-hive/pull/1114 * https://github.com/kamilkisiela/graphql-hive/pull/1120 * https://github.com/kamilkisiela/graphql-hive/pull/1127 * https://github.com/kamilkisiela/graphql-hive/pull/1130 * https://github.com/kamilkisiela/graphql-hive/pull/1142 * https://github.com/kamilkisiela/graphql-hive/pull/1143 * https://github.com/kamilkisiela/graphql-hive/pull/1061