<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Emre Çakır on Medium]]></title>
        <description><![CDATA[Stories by Emre Çakır on Medium]]></description>
        <link>https://medium.com/@ceamkrier?source=rss-892a90bbaa3b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*L9gPgBfrl05ZXf4ebSX1qQ.png</url>
            <title>Stories by Emre Çakır on Medium</title>
            <link>https://medium.com/@ceamkrier?source=rss-892a90bbaa3b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 08:07:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ceamkrier/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Key Takeaways from Yann LeCun’s Vision of AI’s Future]]></title>
            <link>https://medium.com/@ceamkrier/key-takeaways-from-yann-lecuns-vision-of-ai-s-future-f9962565564a?source=rss-892a90bbaa3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9962565564a</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai-ethics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[future-of-ai]]></category>
            <dc:creator><![CDATA[Emre Çakır]]></dc:creator>
            <pubDate>Thu, 01 Feb 2024 20:44:43 GMT</pubDate>
            <atom:updated>2024-02-01T20:44:43.638Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KYgBOoQN5hTpLNJR91swhg.jpeg" /></figure><h4>Explore AI’s future with Yann LeCun’s insights simplified for easy understanding.</h4><h3>Introduction</h3><p>This blog post is based on a video by AI pioneer Yann LeCun, where he shares his vision for the future of AI. I’ve distilled the key takeaways from his talk into a simple, easy-to-understand format. I hope this helps you gain a deeper understanding.</p><p>You can also watch the original video:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fd_bdU3LsLzE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dd_bdU3LsLzE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fd_bdU3LsLzE%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7e0b02e047192ffff09df3ad51f4a171/href">https://medium.com/media/7e0b02e047192ffff09df3ad51f4a171/href</a></iframe><h3>Understanding AI’s Core: Auto-Regressive Models</h3><ul><li><strong>What Are They</strong>: AI predicts what comes next based on previous information.</li><li><strong>Analogy</strong>: Like guessing the next word in a sentence you’re reading.</li></ul><p>Auto-regressive models are AI’s way of predicting the future based on the past. Think of it like your phone’s predictive text — it suggests the next word based on what you’ve already typed. While this works well for structured tasks, it’s not foolproof, and the complexity of human language can trip it up, leading to errors or “hallucinations.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JqLxQflTkQ9jvVEX.png" /></figure><h3>The ‘Common Sense’ Challenge in AI</h3><ul><li><strong>AI ‘Common Sense’</strong>: Not instinctual; it’s about processing and reacting to data.</li><li><strong>Human vs. AI Sense</strong>: AI lacks the wide-ranging, intuitive grasp of the world humans have.</li><li><strong>Specialization</strong>: AI shines in specific tasks but falters in generalized understanding.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MZzxLN6Qcjkm_fFF.png" /></figure><p>Unlike humans, AI doesn’t come pre-equipped with ‘common sense.’ Its understanding is limited to the data it’s been fed. It’s like teaching someone to cook using only recipes — they can follow steps but can’t improvise a meal with random fridge leftovers. AI’s common sense is akin to this recipe-following ability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OCU3lfW9r_RYzm2N.png" /></figure><h3>AI Myths: General Intelligence vs. Specialization</h3><ul><li><strong>General Intelligence</strong>: The idea that AI can know and do everything well is a myth.</li><li><strong>Human Parallels</strong>: We’re all specialized; expertise in one area doesn’t equal universal knowledge.</li><li><strong>AGI’s Reality</strong>: True Artificial General Intelligence (AGI) remains a distant goal.</li></ul><p>The notion of a machine possessing general intelligence, being a Jack-of-all-trades, is still in the realm of science fiction. AI, as of now, excels in specific domains — it can beat grandmasters in chess but can’t necessarily navigate daily life like humans. It’s this distinction between narrow AI expertise and the broader general intelligence that we must appreciate.</p><h3>AI’s ‘Hallucinations’ and Decision-Making</h3><ul><li><strong>Hallucinations in AI</strong>: When AI makes up information not based in reality.</li><li><strong>Decision Making</strong>: Current AI lacks the ability to plan or reason like humans do.</li><li><strong>Understanding Errors</strong>: A small mistake can lead AI to a completely wrong conclusion.</li></ul><p>When AI makes what we call a ‘hallucination,’ it’s essentially making a guess without enough correct information, much like if someone asked you to finish a sentence in a language you barely know. The decision-making process in AI is currently a one-step-at-a-time approach without a clear foresight, which can lead to cascading errors in its output.</p><h3>Rethinking AI Development</h3><ul><li><strong>New Architecture</strong>: Shift from generative to joint-embedding architectures for better results.</li><li><strong>Model-Predictive Control</strong>: A method allowing AI to plan and decide more effectively.</li></ul><p>Moving away from traditional generative models to joint-embedding architectures could allow AI to make more nuanced decisions. It’s a bit like planning a road trip using a detailed map rather than just following the road signs. This model-predictive control could be a game-changer for AI’s ability to plan ahead.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WNDa7KP1mlB7ZTCI.png" /></figure><h3>AI as a Universal Interface</h3><ul><li><strong>Future Role</strong>: AI could mediate our interaction with the digital world.</li><li><strong>Cultural Repository</strong>: AI has the potential to hold all human knowledge and culture.</li><li><strong>Open Source</strong>: Essential for ensuring diversity and widespread access.</li></ul><p>In the future, AI might become the middleman between us and the digital world, holding the key to all human knowledge and culture. This necessitates an open-source approach to AI development to keep this knowledge free and accessible, much like the internet is today.</p><h3>Implications for Industry and Policy</h3><ul><li><strong>Common Platforms</strong>: AI systems will need to be open and accessible.</li><li><strong>Shared Infrastructure</strong>: Like the internet, AI could be a shared digital space.</li><li><strong>Crowd-Sourced Training</strong>: Public contribution to AI learning for better customization.</li></ul><p>The vision for AI is to become a shared digital foundation upon which diverse applications are built. This means the training and fine-tuning of AI would be a collective effort, harnessing the expertise and input of people worldwide to create a system that’s as diverse and versatile as the human population itself.</p><h3>Countering AI Doomsday Predictions</h3><ul><li><strong>Speculations vs. Reality</strong>: Concerns about AI leading to human extinction are largely speculative.</li><li><strong>Safe AI Development</strong>: It’s possible and necessary, akin to building reliable airplanes.</li><li><strong>Time Investment</strong>: Developing robust AI systems will take time and care.</li></ul><p>The fear that AI could lead to our downfall is more a work of fiction than a likely future. Just as we’ve developed safe air travel after many years, we can build safe AI systems through careful engineering. It’s a process that will undoubtedly take time and patience, but it’s entirely within our reach.</p><h3>Aligning AI with Human Values</h3><ul><li><strong>The Alignment Problem</strong>: Ensuring AI decisions align with human objectives and ethics.</li><li><strong>Benefit Amplification</strong>: AI has the potential to enhance human intelligence and capabilities.</li><li><strong>Societal Impact</strong>: Comparable to the printing press, AI could herald a new era of enlightenment.</li></ul><p>The alignment problem is about making sure AI’s decisions match our values and ethics. Solving this is as much a technical challenge as a philosophical one. The potential benefits are enormous, with AI poised to enhance human intelligence and productivity, much like the printing press revolutionized the spread of knowledge.</p><h3>Conclusion</h3><p>And there we have it — a glimpse into the intricate world of AI through the lens of an expert, repackaged here with simplicity and clarity. Yann LeCun’s insights remind us that AI is not just a scientific endeavor but also a reflection of our human ambition to create and understand.</p><p>My perspective, shaped by these notes, leans towards cautious optimism. AI, with all its flaws and potential, is like a mirror to our own complexity. It’s a journey that we are all a part of, and together, we can steer it towards a future that amplifies the best of human intelligence and creativity.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9962565564a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Guarding Your Forms with Cloudflare’s Turnstile]]></title>
            <link>https://medium.com/@ceamkrier/guarding-your-forms-with-cloudflares-turnstile-9e10591b3ea2?source=rss-892a90bbaa3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e10591b3ea2</guid>
            <category><![CDATA[captcha]]></category>
            <category><![CDATA[turnstile]]></category>
            <category><![CDATA[cloudflare-workers]]></category>
            <category><![CDATA[anti-spam-techniques]]></category>
            <category><![CDATA[cloudflare]]></category>
            <dc:creator><![CDATA[Emre Çakır]]></dc:creator>
            <pubDate>Sun, 07 Jan 2024 11:33:02 GMT</pubDate>
            <atom:updated>2024-01-07T11:33:02.342Z</atom:updated>
            <content:encoded><![CDATA[<h4>Learn how to fortify your forms using Cloudflare’s Turnstile for non-interactive captcha, and dive into code examples with a guide on client-side implementation and server-side verification with Cloudflare Workers.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GdpgHOD6RfcjnLIudi0-fQ.jpeg" /></figure><h3>Introduction</h3><p>Securing web forms has become an increasingly pertinent issue in today’s digital landscape. With Cloudflare’s Turnstile, implementing non-interactive captchas to protect forms has never been easier.</p><p>This guide will walk you through a step-by-step process of integrating Cloudflare’s Turnstile into your forms for non-interactive captcha protection.</p><p>Here is a high-level overview of what is happening behind the scenes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*966YDLPtObTWr4hX.png" /><figcaption>Taken from <a href="https://developers.cloudflare.com/turnstile/">Cloudflare</a></figcaption></figure><h3>Getting Started with Cloudflare’s Turnstile</h3><p>Firstly, you’ll need a Cloudflare account. If you don’t have one, you can easily <a href="https://dash.cloudflare.com/sign-up">create a new account</a>. If you’ve already registered, simply <a href="https://dash.cloudflare.com/login">log in</a>.</p><p>Once logged in, navigate to the Turnstile section via the left-hand navigation bar. Click to add a new site, giving it a descriptive name for ease of management. Next, add your domain — if you’re currently working locally, you can use ’localhost‘.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/0*xymZPl7_DrqjYz2g.png" /></figure><p>At this stage, you’ll need to select ‘Widget Mode’ — this will determine how your captcha behaves. You can choose from:</p><ul><li><strong>Managed</strong>: Cloudflare uses visitor data to determine if an interactive challenge is required.</li><li><strong>Non-Interactive</strong>: Provides a completely non-interactive challenge.</li><li><strong>Invisible</strong>: Offers an invisible challenge that doesn’t require user interaction.</li></ul><p>For this guide, we will be focusing on the non-interactive mode.</p><p>After completing these steps, you’ll receive a Site Key and a Secret Key.</p><p>The Site Key is used on the client side as a unique identifier, while the Secret Key is used on the server side to validate the client’s token.</p><h3>Implementing on the Client Side with Next.js</h3><p>With your keys in hand, you’re ready to start integrating Turnstile into your application. We will be using Next.js and creating a custom hook, allowing us to easily plug the captcha into any form.</p><p>Below is the custom hook:</p><pre>import { useCallback, useEffect, useMemo, useState } from &#39;react&#39;<br>import Script from &#39;next/script&#39;<br><br>const TURNSTILE_PUBLIC_SITE_KEY = &#39;YOUR-SITE-KEY&#39;<br><br>const useTurnstileCaptcha = () =&gt; {<br> const [token, setToken] = useState()<br> const [widgetId, setWidgetId] = useState()<br><br> const content = useMemo(<br>  () =&gt; (<br>   &lt;&gt;<br>    &lt;Script<br>     src=&#39;https://challenges.cloudflare.com/turnstile/v0/api.js?onload=onloadTurnstileCallback&#39;<br>     strategy=&#39;lazyOnload&#39;<br>     defer<br>     async<br>    /&gt;<br>    &lt;div id=&#39;cpt-trnstl-container&#39; /&gt;<br>   &lt;/&gt;<br>  ),<br>  []<br> )<br><br> const initializeCaptcha = () =&gt; {<br>  if (window &amp;&amp; window?.turnstile) {<br>   const id = window.turnstile.render(&#39;#captcha-container&#39;, {<br>    sitekey: TURNSTILE_PUBLIC_SITE_KEY,<br>    callback: function (token) {<br>     setToken(token)<br>    }<br>   })<br>   setWidgetId(id)<br>  }<br> }<br><br> useEffect(() =&gt; {<br>  if (window) {<br>   window.onloadTurnstileCallback = initializeCaptcha<br>  }<br><br>  return () =&gt; {<br>   window.onloadTurnstileCallback = null<br>  }<br> }, [])<br><br> // Since the Next.js is a single page application<br> // the captcha widget will not be re-rendered on route change<br> // so we need to issue a re-render manually<br> useEffect(() =&gt; {<br>  initializeCaptcha()<br> }, [content])<br><br> // This is the function that resets the captcha widget<br> // which will give you a new token<br><br> // routing to a new page will create a new widget with new widgetId<br> // it is crucial to call the reset with the widgetId<br> const resetWidget = useCallback(() =&gt; {<br>  if (window &amp;&amp; window?.turnstile) {<br>   window.turnstile.reset(widgetId)<br>  }<br> }, [widgetId])<br><br> const validateCaptcha = useCallback(async () =&gt; {<br>  try {<br>   // This is the function that sends the token to your captcha verification service<br>   const verificationResponse = await fetch(&#39;YOUR-CAPTCHA-VERIFY-SERVICE-URL&#39;, {<br>    method: &#39;POST&#39;,<br>    headers: {<br>     &#39;Content-Type&#39;: &#39;application/json&#39;<br>    },<br>    body: JSON.stringify({<br>     token<br>    })<br>   })<br><br>   const verificationResponseJson = await verificationResponse.json()<br><br>   return verificationResponseJson?.data<br>  } catch (error) {<br>   return false<br>  }<br> }, [token])<br><br> return { content, token, validateCaptcha, resetWidget }<br>}<br><br>export default useTurnstileCaptcha</pre><p>The hook is ready, let’s implement the server side to validate the captcha token.</p><h3>Implementing on the Server Side with Cloudflare Workers</h3><p>Having set up the client-side implementation, it’s time to create a server-side service that can validate the captcha. Cloudflare Workers offers a seamless way to accomplish this.</p><p>To create a new project with Cloudflare Workers, we’ll use the Wrangler CLI. Wrangler is a command-line tool for interacting with Cloudflare’s developer products. To install or update Wrangler, follow the instructions <a href="https://www.ceamkrier.com/post/cloudflare-turnstile-guide/%22https://developers.cloudflare.com/workers/cli-wrangler/install-update%22">here</a>.</p><p>Here’s an overview of how to set up the worker.</p><p>This is the entry point. The worker.js:</p><pre>import apiRouter from &#39;./router&#39;<br><br>export default {<br> async fetch(request, env, ctx) {<br>  return apiRouter.handle(request, env)<br> }<br>}</pre><p>And, router.js:</p><pre>import { Router } from &#39;itty-router&#39;<br>import { verifyCaptcha } from &#39;./services/captcha&#39;<br>import { generateCorsHeaders } from &#39;./corsHelper&#39;<br><br>const router = Router()<br><br>// Add any other allowed origins here<br>const ALLOWED_ORIGINS = [&#39;http://localhost:3000&#39;]<br><br>// Handle CORS preflight requests<br>router.options(&#39;*&#39;, (request) =&gt; {<br> const origin = request.headers.get(&#39;Origin&#39;)<br><br> if (ALLOWED_ORIGINS.includes(origin)) {<br>  return new Response(null, {<br>   headers: generateCorsHeaders(origin)<br>  })<br> }<br><br> return new Response(null, {<br>  headers: {<br>   Allow: &#39;OPTIONS&#39;<br>  },<br>  status: 405<br> })<br>})<br><br>// Handle captcha verification requests<br>router.post(&#39;/verify&#39;, async (request, env) =&gt; {<br> const content = await request.json()<br> const origin = request.headers.get(&#39;Origin&#39;)<br> const ip = request.headers.get(&#39;CF-Connecting-IP&#39;)<br><br> // env passed in from worker.js<br> const secretKey = env.CAPTCHA_SECRET_KEY<br> const token = content.token<br><br> const verificationResult = await verifyCaptcha({ token, ip, secretKey })<br><br> return new Response(JSON.stringify({ data: verificationResult }), {<br>  headers: generateCorsHeaders(origin)<br> })<br>})<br><br>// 404 for everything else<br>router.all(&#39;*&#39;, () =&gt; new Response(&#39;Not Found.&#39;, { status: 404 }))<br><br>export default router</pre><p>And, verifyCaptcha.js service:</p><pre>const url = &#39;https://challenges.cloudflare.com/turnstile/v0/siteverify&#39;<br><br>export const verifyCaptcha = async ({ token, ip, secretKey }) =&gt; {<br> const formData = new FormData()<br><br> formData.append(&#39;secret&#39;, secretKey)<br> formData.append(&#39;response&#39;, token)<br> formData.append(&#39;remoteip&#39;, ip)<br><br> try {<br>  const result = await fetch(url, {<br>   body: formData,<br>   method: &#39;POST&#39;<br>  })<br><br>  const outcome = await result.json()<br><br>  if (!outcome.success) {<br>   return false<br>  }<br><br>  return true<br> } catch (error) {<br>  return false<br> }<br>}</pre><p>And, the corsHelper.js file:</p><pre>export const generateCorsHeaders = (origin) =&gt; {<br> const corsHeaders = {<br>  &#39;Access-Control-Allow-Methods&#39;: &#39;POST,OPTIONS&#39;,<br>  &#39;Access-Control-Max-Age&#39;: &#39;86400&#39;,<br>  &#39;Access-Control-Allow-Headers&#39;: &#39;Content-Type&#39;,<br>  &#39;Access-Control-Allow-Credentials&#39;: &#39;true&#39;<br> }<br><br> if (origin) {<br>  corsHeaders[&#39;Access-Control-Allow-Origin&#39;] = origin<br> }<br><br> return corsHeaders<br>}</pre><p>As the final step, we need to set the Secret Key. On the local development environment, we need to create a special file: .dev.vars:</p><pre>CAPTCHA_SECRET_KEY=PASTE-YOUR-KEY-HERE</pre><p>You can deploy the worker to Cloudflare with npm run deploy the command.</p><p>For production, you can set the key from the Cloudflare console. First, click on the Workers &amp; Pages tab and select your deployed worker. Then select Settings from the tab and finally pick Variables. Then, add your variable:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mnoU_QeHxXJdXvti.png" /></figure><p>This will re-deploy your worker automatically to use the latest environment values.</p><h3>Integrating into Your Form</h3><p>With both the client and server-side ready, you can now integrate the non-interactive captcha into your form.</p><p>Below is a simple example of a login form utilizing our custom hook:</p><pre>import React from &#39;react&#39;<br><br>const LoginForm = () =&gt; {<br> const { content: captchaContent, validateCaptcha, resetWidget } = useTurnstileCaptcha()<br> <br>const handleFormSubmit = async (event) =&gt; {<br>  event.preventDefault()<br>  <br>  const captchaValidated = await validateCaptcha()<br>  if (!captchaValidated) {<br>   // Notice, we used invisible captcha, so we need to tell user<br>   // about the captcha validation failure<br>   alert(&#39;Captcha validation failed. Please try again.&#39;)<br>   // Reset captcha widget so that user can try again<br>   resetWidget()<br>   return<br>  }<br><br>  // User is validated, so we can proceed with form submission<br>  const { username, password } = event.target.elements<br>  // Do something with username and password<br>  // ...<br> }<br><br> return (<br>  &lt;form&gt;<br>   &lt;input type=&#39;text&#39; name=&#39;username&#39; /&gt;<br>   &lt;input type=&#39;password&#39; name=&#39;password&#39; /&gt;<br>   {captchaContent}<br>   &lt;button type=&#39;submit&#39; onClick={handleFormSubmit}&gt;<br>    Submit<br>   &lt;/button&gt;<br>  &lt;/form&gt;<br> )<br>}<br><br>export default LoginForm</pre><h3>FAQs</h3><h4>What is Cloudflare’s Turnstile?</h4><p>Turnstile is a service provided by Cloudflare that offers captcha solutions to protect forms from spam and abuse. It offers different modes, including managed, non-interactive, and invisible captchas.</p><h4>Why use non-interactive captchas?</h4><p>Non-interactive captchas offer a seamless user experience as they do not require users to solve puzzles or identify images, while still protecting against bots.</p><h4>How does captcha validation work?</h4><p>The captcha generates a unique token on the client side. This token is sent to the server side for validation, and if the validation is successful, it allows the form submission to proceed.</p><h3>Conclusion</h3><p>There you have it! By following this guide, you’ve learned how to implement non-interactive captchas into your forms using Cloudflare’s Turnstile.</p><p>Not only does this provide an additional layer of security for your forms, but it also improves the user experience by not requiring them to solve captchas manually.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e10591b3ea2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enhancing Web Application Security with Cloudflare Access]]></title>
            <link>https://medium.com/@ceamkrier/enhancing-web-application-security-with-cloudflare-access-b55df3f29a54?source=rss-892a90bbaa3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b55df3f29a54</guid>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cloudflare-access]]></category>
            <dc:creator><![CDATA[Emre Çakır]]></dc:creator>
            <pubDate>Sun, 07 Jan 2024 11:26:15 GMT</pubDate>
            <atom:updated>2024-01-07T11:26:15.761Z</atom:updated>
            <content:encoded><![CDATA[<h4>Discover the powerful functionalities of Cloudflare Access in securing your web application at different stages. Explore how it benefits different user groups, from developers to QA, and learn how to integrate it effectively.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iBpXbKRejM8-7ucTwZ7saQ.jpeg" /></figure><h3>Introduction</h3><p>The rise of the digital era has shifted the need for a different kind of security. As web applications become increasingly central to businesses, the focus on their security has never been more significant.</p><p>Today, we’re focusing on how Cloudflare Access can serve as a robust security solution for your web applications, particularly during the development and preview stages.</p><p>Cloudflare Access, a modern security solution, offers a fresh approach to secure hybrid work. It is efficient and secure, an excellent alternative to traditional VPNs. Its applications span from accelerating mergers and acquisitions and providing fast access to contractors and developers, to offering phishing-resistant multi-factor authentication.</p><p>This article aims to provide a comprehensive guide on restricting access using Cloudflare Access. We’ll provide step-by-step procedures and relevant coding examples to ensure you can implement these measures effectively.</p><h3>Cloudflare Access: A New Era of Web Security</h3><h4>The Need for Enhanced Security</h4><p>With the increase in remote working and hybrid work models, securing sensitive data and internal resources has become an essential aspect of business operations. Traditional security measures like VPNs no longer suffice. This is where Cloudflare Access steps in.</p><h4>What is Cloudflare Access?</h4><p>Cloudflare Access is a security feature that provides secure, fast, and seamless access to internal applications without the need for a VPN. It provides a secure connection between users and the internet, protecting your web applications from threats.</p><h4>Key Use Cases of Cloudflare Access</h4><p>Cloudflare Access can be used in various scenarios, including:</p><ul><li><strong>VPN replacement</strong>: Access offers a safer and faster alternative to traditional VPNs, enhancing security and user experience.</li><li><strong>Accelerating mergers and acquisitions</strong>: It can integrate with multiple identity providers (IdPs) and provide per-app internal access during M&amp;As.</li><li><strong>Contractor access</strong>: Cloudflare Access can authenticate third-party users such as contractors with clientless options.</li><li><strong>Developer access</strong>: It allows technical users to securely access critical infrastructure without performance tradeoffs.</li><li><strong>Phishing-resistant MFA</strong>: Cloudflare Access allows the rollout of strong authentication like FIDO2-compliant security keys.</li></ul><h3>Restricting Access with Cloudflare: Step-by-Step Guide</h3><p>Go to the Cloudflare dashboard and navigate to the Zero Trust tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/253/0*tzOqyqvSIlMt_9Ka.jpg" /></figure><p>It would take a few seconds to get the Zero Trust dashboard. Then, go to Access and select Applications. Click on Add application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lv8DOsCKS4LUlecM.jpg" /></figure><p>There are a few options that you can enable Access for. For this tutorial, we will be using the self-hosted application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*n6rLEw1FDnwsDKof.jpg" /></figure><p>Now, we need to give a descriptive name to this application and decide the duration of the Access session. Also, we need to define the application’s domain.</p><p>Note, that the domain should be on Cloudflare.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Q2CR8Dkf2PB_YuxA.jpg" /></figure><p>Define the policies you would like to enforce.</p><p>For this example, I will allow a set of emails to obtain access codes and access the application. There are many other options too. You can decide according to your needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GoFkVRv6OQj17euR.png" /></figure><p>Also, we can define some extra settings.</p><p>Like, CORS settings:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wK4MLGgpA7LUddUX.png" /></figure><p>Cookie settings:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6fYzLSN_h-5Jic1q.png" /></figure><p>And finally, add the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iNUhbE_nnICT1hn3.png" /></figure><p>Now, visiting the application’s domain should display the Access login page.</p><p>Remember, we defined <a href="/service/mailto:joe@company.com">joe@company.com</a> and <a href="/service/mailto:doe@company.com">doe@company.com</a> email addresses on the policy to access the application. If you enter one of those addresses, it will get a code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/0*ZuMQXVgjrClwB2rd.png" /></figure><p>Finally, enter the code and securely access the application.</p><p><strong>A note</strong>, even if you do not enter one of the defined email addresses on the previous screen, it still will show as it sent the code. This is a default security measure taken by Cloudflare.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/0*o2Z1wckxL5J7ZJyE.png" /></figure><h3>Frequently Asked Questions</h3><h4>What is Cloudflare Access?</h4><p>Cloudflare Access is a security feature that provides secure, fast, and seamless access to internal applications without the need for a VPN.</p><h4>How does Cloudflare Access enhance security?</h4><p>Cloudflare Access offers enhanced security by providing a secure connection between users and the internet, effectively protecting your web applications from threats by establishing a secure connection between users and the internet.</p><h4>What are some use cases for Cloudflare Access?</h4><p>Some of the primary use cases for Cloudflare Access include its use as a VPN replacement, accelerating mergers and acquisitions, providing secure access for contractors and developers, and rolling out phishing-resistant multi-factor authentication.</p><h3>Conclusion</h3><p>Web application security is an ongoing challenge for organizations of all sizes. With the ever-evolving threat landscape, it’s essential to equip ourselves with robust and reliable security tools. Cloudflare Access represents one such powerful tool in the modern security arsenal, offering secure and fast access to web applications at various stages of their lifecycle.</p><p>With its varied use cases, Cloudflare Access helps streamline operations without compromising security. By integrating Cloudflare Access into your security strategy, you can ensure that your applications are protected, keeping your data safe and your operations running smoothly.</p><p>Remember, security is not a one-time setup but a continuous process. Stay vigilant, stay updated, and most importantly, stay secure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b55df3f29a54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automating Software Releases with Semantic Release]]></title>
            <link>https://medium.com/@ceamkrier/automating-software-releases-with-semantic-release-2b4db2992593?source=rss-892a90bbaa3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b4db2992593</guid>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[semantic-release]]></category>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[automation-tools]]></category>
            <dc:creator><![CDATA[Emre Çakır]]></dc:creator>
            <pubDate>Sun, 07 Jan 2024 11:18:37 GMT</pubDate>
            <atom:updated>2024-01-07T11:18:37.583Z</atom:updated>
            <content:encoded><![CDATA[<h4>Learn how semantic release automates software versioning and packaging by analyzing commit messages. Understand the benefits of semantic release, how it works, and how to implement it in CI/CD pipelines.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*totTIWkiOXFw9R9SDJp2ww.jpeg" /></figure><h3>Introduction</h3><p>Software teams aim to ship quality code frequently. However, managing releases manually is tedious and error-prone. Semantic release streamlines releasing by automating the whole process.</p><h3>TL;DR:</h3><ul><li>Semantic release automates the software release workflow by analyzing commit messages.</li><li>It takes care of incrementing version numbers, generating changelogs, and publishing packages.</li><li>To use it, projects must craft commit messages following the Conventional Commits standard.</li><li>Overall, semantic release enables teams to deliver value faster by eliminating manual toil in releases.</li></ul><h3>What is Semantic Release?</h3><p>Semantic release is a tool for automating software releases and version management. It facilitates implementing semantic versioning by analyzing commit messages to determine the next semantic version bump.</p><p>Here’s how it works:</p><ul><li>Developers author commit messages following the Conventional Commits specification.</li><li>Semantic release analyzes commits and generates release notes.</li><li>If a release is necessary, it publishes the package creates a Git tag, and releases it on GitHub.</li></ul><p>In short, the semantic release takes the human element out of software releases.</p><h3>Benefits of Semantic Release</h3><p>Automating releases with semantic release offers several advantages:</p><h4>Easy Versioning</h4><p>Semantic release handles version numbering automatically based on commits. Developers don’t have to decide manually whether a change warrants a major, minor, or patch release.</p><h4>Consistent Releases</h4><p>The process for publishing releases is codified and applied consistently across projects.</p><h4>Improved Collaboration</h4><p>Because semantic release relies on properly formatted commit messages, it encourages developers to collaborate better on commit hygiene.</p><h4>Reduced Human Error</h4><p>Taking humans out of the loop decreases the chances of mistakes in changelogs or accidentally introducing breaking changes.</p><h4>Release Velocity</h4><p>Automation enables the release of software faster and more frequently.</p><h3>How to Use Semantic Release</h3><p>Using semantic release involves adding it to your project and configuring a few key components.</p><h4>Installation</h4><p>Install the semantic release module:</p><p>npm install — save-dev semantic-release</p><h4>Release Configuration</h4><p>semantic-release is configured in release.config.js:</p><pre>const config = {<br>	branches: [&#39;main&#39;],<br>	plugins: [<br>		&#39;@semantic-release/commit-analyzer&#39;,<br>		&#39;@semantic-release/release-notes-generator&#39;,<br>		&#39;@semantic-release/github&#39;<br>	]<br>}</pre><pre>module.exports = config</pre><p>This configures the:</p><ul><li>Branch to release from</li><li>Commit analyzer plugin</li><li>Release notes generator</li><li>GitHub plugin for releases</li></ul><h4>Commit Message Format</h4><p>The commit analyzer plugin reads commit messages to determine the next semantic version. Messages must follow the Conventional Commits format:</p><pre>&lt;type&gt;(&lt;scope&gt;): &lt;description&gt;</pre><p>For example:</p><pre>fix(parser): correct issue parsing numbers</pre><p>Common types are:</p><ul><li>fix — for bug fixes</li><li>feat — for new features</li><li>docs — for documentation changes</li><li>refactor — for code refactoring</li></ul><h4>Continuous Integration</h4><p>Finally, the semantic release is typically run in CI to automate publishing releases for each commit. Here is an example .github/workflows/release.yml to trigger semantic release on GitHub Actions:</p><pre>name: Release<br>on:<br>  workflow_dispatch:</pre><pre>jobs:<br>  release:<br>    permissions:<br>      contents: write<br>      pull-requests: write<br>      issues: write</pre><pre>    runs-on: ubuntu-latest</pre><pre>    steps:<br>      - uses: actions/checkout@v3</pre><pre>      - name: Release<br>        run: npx semantic-release<br>        env:<br>          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}</pre><p>This runs semantic-release whenever a new workflow is triggered manually on GitHub. I find that more robust to have full control over when should a release job run.</p><h3>Frequently Asked Questions</h3><h4>What commit message types can you use?</h4><p>The common types are fix, feat, docs, style, refactor, and test. But semantic release supports any custom type.</p><h4>Does semantic release work with git-flow?</h4><p>Yes, semantic release works fine with git-flow style branching workflows.</p><h4>How do you configure releasing from multiple branches?</h4><p>You can specify multiple branch names in the “branches” array in release.config.js.</p><h4>What CI tools can run semantic release?</h4><p>Semantic-release works with CircleCI, Travis CI, GitHub Actions, and more. It runs on any CI tool that can install node modules.</p><h4>Can I preview the next version before releasing it?</h4><p>Yes, the semantic release includes a “dryRun” mode that simulates a release without publishing.</p><h3>Summary</h3><p>The semantic release allows teams to focus their efforts on building software rather than coordinating releases. Codifying releases and leveraging commit hygiene, brings order and automation to the delivery process. This helps ship quality software faster and more reliably.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b4db2992593" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enhancing Language Models with Retrieval Augmented Generation]]></title>
            <link>https://medium.com/@ceamkrier/enhancing-language-models-with-retrieval-augmented-generation-1a7c496bb0e5?source=rss-892a90bbaa3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a7c496bb0e5</guid>
            <category><![CDATA[natural-language-process]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[knowledge-retrieval]]></category>
            <dc:creator><![CDATA[Emre Çakır]]></dc:creator>
            <pubDate>Sun, 07 Jan 2024 11:14:35 GMT</pubDate>
            <atom:updated>2024-01-07T11:14:35.168Z</atom:updated>
            <content:encoded><![CDATA[<h4>Learn how retrieval augmented generation (RAG) improves language models and understand the benefits of RAG, how it differs from alternatives like fine-tuning when to use it, and its applications.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vMe-eU6L0Xy1roVQrGySEQ.jpeg" /></figure><h3>Introduction</h3><p>Large language models like GPT-3 have shown impressive capabilities, but still struggle with factual reasoning and relying on real-world knowledge. Retrieval-augmented generation (RAG) offers a technique to overcome these limitations by enhancing language models with relevant external information extracted from corpora.</p><p>This article provides a comprehensive overview of RAG — how it works, its benefits over alternative adaptation methods, when it is most applicable, and who stands to gain from this approach. We discuss the key innovations of RAG including joint training of retriever and generator models, techniques for integrating retrieved knowledge, and comparisons to internet search plugins.</p><p>By grounding language generation in retrieved evidence, RAG enables more accurate, knowledgeable responses from large models. This technique holds promise for creating AI systems capable of expert-level reasoning.</p><h3>What is Retrieval-Augmented Generation?</h3><p>Retrieval-Augmented Generation (RAG) integrates external knowledge into language models through a retriever module that extracts relevant information from a large corpus, and a generator module that conditions this knowledge when generating text.</p><p>For example, for the question “<strong>Where was Barack Obama born</strong>?”, the retriever would find passages mentioning ”<strong>Barack Obama</strong>” and ”<strong>birthplace</strong>” and return “<strong>Barack Obama was born in Honolulu, Hawaii</strong>”. The generator would use this to compose the answer “<strong>Barack Obama was born in Honolulu, Hawaii in 1961.</strong>”</p><p>RAG equips models with external facts and commonsense knowledge beyond their training data. This results in more accurate, factual responses grounded in reality.</p><h3>How is RAG Different from Internet Search Plugins?</h3><p>RAG provides some key advantages over simply having an internet search plugin for models like chatGPT:</p><ul><li>The retriever is trained jointly with the generator model in an end-to-end fashion. This allows the system to learn how to utilize retrieved knowledge best.</li><li>Retrieval is done on a closed domain-specific corpus rather than an open-ended internet search. This provides more control over the knowledge source.</li><li>RAG focuses on identifying the most relevant facts rather than full internet results which can be information overload.</li><li>RAG can leverage optimized pre-trained models like DPR and GPT-3 tailored for this technique.</li><li>RAG has flexibility in integrating retrieval into the generator, like concatenating to the input context.</li></ul><h3>Why Does RAG Matter for Language Models?</h3><p>RAG addresses key weaknesses of language models:</p><ol><li>Tendency to hallucinate incorrect text: LMs can generate plausible but false statements without factual grounding. RAG forces generation to conform to retrieved evidence.</li><li>Lack of world knowledge: No training data covers all concepts. RAG provides external knowledge.</li><li>Poor reasoning skills: Models struggle with compositional generalization. Conditioning on retrieved facts enables multi-step inference.</li></ol><h3>How Does the RAG Approach Work?</h3><p>You can see the detailed workflow of RAG:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4OA-rnFi8pTj9Oja.png" /></figure><ol><li><strong>User Interaction</strong>: This icon represents a user, who initiates the process by posing a query or prompt. The bi-directional arrow indicates that there is two-way communication between the user and the system.</li><li><strong>Prompt Interpretation</strong>: Once the user poses a question, the system will first interpret or preprocess the question to understand its context and intention. This could involve tokenizing the text, understanding the semantics, or even converting it into a format suitable for further processing.</li><li><strong>Document Retrieval</strong>: Post interpretation, the system searches a large corpus or database of documents to retrieve relevant information or documents that might contain the answer. The magnifying glass over the document symbolizes this search process.</li><li><strong>Information Extraction</strong>: After retrieving relevant documents, the system will extract specific information or data points from these documents. The process is symbolized by the arrows pointing from the documents to the database icon.</li><li><strong>Integration with AI Model</strong>: The extracted information is then fed into an AI model, represented by the AI chip in the image. This model will process the information and attempt to generate a response.</li><li><strong>Model’s Processing</strong>: Within the AI model, several internal processes take place, such as understanding context, comparing the information with its trained data, and formulating an appropriate response.</li><li><strong>Response Formulation</strong>: The AI model, after its internal processing, formulates a response most suited to the user’s original prompt. This step is symbolized by the arrow pointing from the AI chip to the chat bubble.</li><li><strong>Response to User</strong>: Finally, the system delivers the formulated response back to the user, completing the cycle of interaction. This is represented by the arrow pointing towards the user.</li></ol><h3>When is RAG Useful?</h3><p>RAG shines for:</p><ul><li>Knowledge-intensive tasks like QA, dialogue agents, and summarization.</li><li>Limited training data but large unlabeled corpora available. Retrieval provides additional supervision.</li><li>Augmenting supervised learning with real-world knowledge.</li></ul><p>For instance, a medical chatbot trained only on patient conversations would not know facts about medicine. Connecting it to medical databases via RAG provides vital external knowledge.</p><h3>Who Can Benefit from RAG?</h3><p>RAG is a versatile technique that can enhance applications of AI systems across domains:</p><ul><li>NLP researchers can build more capable conversational agents.</li><li>Enterprise companies can deploy AI assistants better equipped for complex reasoning.</li><li>Educators can create question-answering systems with access to knowledge bases.</li></ul><h3>How does RAG compare to fine-tuning and embeddings?</h3><p>RAG can be compared to other techniques like fine-tuning and input embeddings for adapting large language models (LLMs) to specific tasks:</p><ul><li><strong>Fine-tuning</strong>: Fine-tunes the entire LLM on downstream data. Allows end-to-end training but can overfit.</li><li><strong>Input embeddings</strong>: Injects task-specific vectors into the LLM input. Does not require training but limited integration.</li><li><strong>RAG</strong>: Leaves LLM largely unchanged but augments input with retrieved knowledge.</li></ul><h4>Pros of RAG:</h4><ul><li>Provides external knowledge beyond training data.</li><li>Avoids overfitting issues of full fine-tuning.</li><li>More flexible input integration than embeddings.</li><li>Joint training optimizes retrieval and generation.</li></ul><h4>Cons of RAG:</h4><ul><li>Needs a suitable in-domain corpus of knowledge.</li><li>Rigidly sticks to retrieved facts, even if incorrect.</li><li>Does not adapt internal models like fine-tuning.</li></ul><p>So RAG offers a beneficial balance — adapting through external knowledge rather than internal parameters. For knowledge-intensive tasks with limited data, RAG is preferable over fine-tuning LLMs directly.</p><h3>How does RAG compare to input embeddings?</h3><p>RAG relates to input embeddings, but has some key differences:</p><ul><li><strong>Input embeddings</strong>: Encodes query into vector representations that map to relevant knowledge chunks.</li><li><strong>RAG</strong>: Retrieves full passages of text related to the query.</li></ul><h4>How embeddings work:</h4><ul><li>Embeddings directly inject query vector representations into the language model input.</li><li>The query vectors allow the model to match against knowledge encoded in its vector space.</li><li>Embeddings are static pre-defined task descriptors.</li></ul><h4>How RAG augments input:</h4><ul><li>RAG uses a retriever to find relevant textual passages for the query context.</li><li>The top passages are concatenated to the original query to form an expanded input context.</li><li>This provides much richer contextual information vs just query vectors.</li><li>Retrieval is done dynamically for each specific query.</li><li>Requires end-to-end training of retriever and generator.</li></ul><p>In summary, RAG integrates external knowledge through contextual textual retrieval rather than just vector representations. This provides more extensive contextual information to the language model during generation.</p><h3>Conclusion</h3><p>RAG improves language models by grounding them in external knowledge, with benefits over ad-hoc internet search plugins. The optimized retrieval and integration make RAG effective for factual reasoning.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a7c496bb0e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Serverless Functions Get Challenged by Cloudflare]]></title>
            <link>https://medium.com/@ceamkrier/why-serverless-functions-get-challenged-by-cloudflare-581181433d67?source=rss-892a90bbaa3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/581181433d67</guid>
            <category><![CDATA[firewall]]></category>
            <category><![CDATA[vercel]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[serverless-functions]]></category>
            <dc:creator><![CDATA[Emre Çakır]]></dc:creator>
            <pubDate>Wed, 03 Jan 2024 11:37:21 GMT</pubDate>
            <atom:updated>2024-01-03T11:37:21.894Z</atom:updated>
            <content:encoded><![CDATA[<h4>Explore how to resolve Cloudflare challenges for serverless functions, from error diagnosis to implementing a custom firewall solution.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jzkmls0P8ZfM_Xluj_AIiA.png" /></figure><h3>Understanding the Unexpected Error</h3><p>At first, everything seems normal, but then errors start appearing in your serverless function requests. The confusing part? Everything works fine locally.</p><p>The real head-scratcher is the error message: {&quot;0&quot;:&quot;&lt;&quot;,&quot;1&quot;:&quot;.... It’s like a cryptic puzzle with missing pieces.</p><p>I translated the JSON-ified response to see what I am dealing with and..:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en-US&quot;&gt;<br>    &lt;head&gt;<br>        &lt;title&gt;Just a moment...&lt;/title&gt;<br>        &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;<br>        &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=Edge&quot; /&gt;<br>        &lt;meta name=&quot;robots&quot; content=&quot;noindex,nofollow&quot; /&gt;<br>        &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width,initial-scale=1&quot; /&gt;<br>        &lt;link href=&quot;/cdn-cgi/styles/challenges.css&quot; rel=&quot;stylesheet&quot; /&gt;<br>        &lt;meta http-equiv=&quot;refresh&quot; content=&quot;375&quot; /&gt;<br>    &lt;/head&gt;<br>    &lt;body class=&quot;no-js&quot;&gt;<br>        &lt;div class=&quot;main-wrapper&quot; role=&quot;main&quot;&gt;<br>            &lt;div class=&quot;main-content&quot;&gt;<br>                &lt;noscript&gt;<br>                    &lt;div id=&quot;challenge-error-title&quot;&gt;<br>                        &lt;div class=&quot;h2&quot;&gt;<br>                            &lt;span class=&quot;icon-wrapper&quot;&gt;<br>                                &lt;div class=&quot;heading-icon warning-icon&quot;&gt;&lt;/div&gt;<br>                            &lt;/span&gt;<br>                            &lt;span id=&quot;challenge-error-text&quot;&gt;<br>                                Enable JavaScript and cookies to continue<br>                            &lt;/span&gt;<br>                        &lt;/div&gt;<br>                    &lt;/div&gt;<br>                &lt;/noscript&gt;<br>            &lt;/div&gt;<br>        &lt;/div&gt;<br>    &lt;/body&gt;<br>&lt;/html&gt;</pre><h3>Approaching the Problem</h3><p>Upon closer inspection, you realize the error is JSON-encoded HTML. The turning point is discovering HTML &lt;title&gt; tag, which reads “<strong>Just a moment…</strong>”.</p><p>This small clue leads to <strong>a big revelation</strong>: challenge-error visible. The realization dawns on you: your API is being challenged by Cloudflare.</p><h3>The “How” of Cloudflare’s Challenge</h3><p>Diving into the Cloudflare dashboard, you notice a pattern of ever-changing IP addresses requesting your API. These are your serverless functions from Vercel, constantly switching IPs — a typical behavior in a serverless architecture.</p><h3>Why Serverless Functions Change IPs</h3><p>The nature of serverless functions is not to run continuously; they get fresh IPs for every new instance. This dynamic IP allocation makes it hard to whitelist them in Cloudflare’s firewall, as they appear as new entities with each request.</p><h3>Navigating Cloudflare’s Defenses</h3><p>Recognizing the challenge, the next step is to find a way to allow your serverless function traffic through Cloudflare’s strict security measures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5IKOes-LEErat1XoVNGE4Q.png" /><figcaption>Allowing traffic on the Cloudflare firewall</figcaption></figure><p>Cloudflare is designed for internet safety, offering tools to protect web applications. In your case, this meant that your API, secured behind Cloudflare, was treating the serverless functions’ requests as potential threats due to their constantly changing IP addresses.</p><h3>Allowing Your Traffic Through</h3><p>Fortunately, Cloudflare’s firewall is highly configurable. To tackle the issue, you implement a solution using a custom header with a secret value.</p><p>You set up the Cloudflare firewall to allow traffic that includes the header “<strong>x-vercel-serverless</strong>” accompanied by a specific long secret string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OxhkTQej5vHtP0hqVusJfg.png" /><figcaption>Creating a firewall bypass rule</figcaption></figure><p>Following this, you update your serverless functions to include this header in their requests, ensuring smooth communication with your API.</p><h3>Lessons Learned</h3><p>Through this experience, several key lessons emerge:</p><ol><li>Understanding Serverless Complexities: The dynamic IP nature of serverless functions can create unexpected challenges in network security.</li><li>The Role of Monitoring Systems: Effective monitoring is crucial for early detection and resolution of such issues.</li><li>Flexibility of Cloudflare: Deep understanding and creative use of Cloudflare’s tools are essential, especially in complex scenarios.</li><li>Innovative Problem-Solving: Sometimes, unconventional solutions like using a custom header can effectively address specific challenges.</li><li>Continuous Adaptation and Learning: The rapidly evolving tech landscape requires constant learning and adaptation, turning every problem into an opportunity for growth.</li></ol><h3>Conclusion</h3><p>This journey not only ensured the seamless functioning of your serverless functions but also provided invaluable insights into managing cloud-based applications. It highlights the importance of understanding your tools and adapting to the unique challenges they present in the world of web development.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=581181433d67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows Sandbox for Safe Experimentation]]></title>
            <link>https://medium.com/@ceamkrier/windows-sandbox-for-safe-experimentation-38dfa51aab77?source=rss-892a90bbaa3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/38dfa51aab77</guid>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[windows-sandbox]]></category>
            <category><![CDATA[virtual-environment]]></category>
            <category><![CDATA[sandbox-configuration]]></category>
            <category><![CDATA[pc-security]]></category>
            <dc:creator><![CDATA[Emre Çakır]]></dc:creator>
            <pubDate>Wed, 03 Jan 2024 11:29:45 GMT</pubDate>
            <atom:updated>2024-01-03T11:29:45.129Z</atom:updated>
            <content:encoded><![CDATA[<h4>Explore safe software testing with Windows Sandbox. Learn to set up, customize, and use scripts for secure PC experimentation.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ivvf-m6CRs52CFN7mP81pA.png" /></figure><p>Have you ever wanted to test a new app or visit a website but worried it might harm your computer? Well, if you’re using Windows 10 <strong>Pro</strong> or above, I’ve got great news for you: Windows Sandbox is here to save the day!</p><p><strong>Windows Sandbox</strong> is like a superhero for your PC, creating a safe space where you can test anything without fear.</p><h3>The Magic of Sandbox Environments</h3><p>Why are sandbox environments so awesome? Imagine you’re a scientist in a lab, experimenting without the risk of blowing up the whole building. That’s what Windows Sandbox does for your PC. It’s perfect for:</p><p>- <strong>Testing suspicious software</strong>: Not sure if that new app is safe? Try it in the sandbox!</p><p>- <strong>Exploring unknown websites</strong>: Wander the wilds of the internet without a trace.</p><p>- <strong>Developers and tech enthusiasts</strong>: Test code, apps, or settings without risking your main system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*TVEttUWaBN9IcZLFc3W8xA.jpeg" /><figcaption>Windows Sandbox Preview</figcaption></figure><h3>Setting Up Windows Sandbox</h3><p>Ready to dive in? First, you need to enable Windows Sandbox in your Windows settings. It’s a breeze — just a few clicks and you’re good to go!</p><p>Type <strong>Windows Features</strong> in your search bar and you should see a window like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*6ix-doc8wuSNXAGinveqcA.jpeg" /><figcaption>Windows Features Settings</figcaption></figure><p>Ensure the <strong>Windows Sandbox</strong> option is checked. You may need to restart your computer to make sure this takes effect.</p><h3>Customizing Your Sandbox</h3><h4>Configuring with Ease</h4><p>What’s cool about Windows Sandbox is that you can make it your own. Want specific files or scripts ready to go? No problem!</p><p><strong>Create Your Custom Sandbox:</strong></p><p>1. Make a new file with a `<strong>.wsb</strong>` extension.</p><p>2. Edit the content to include folders you want to share between your main system and the sandbox, like this:</p><pre>&lt;Configuration&gt;<br>  &lt;MappedFolders&gt;<br>    &lt;MappedFolder&gt;<br>      &lt;HostFolder&gt;C:\Users\User\Desktop\YourFolderYouWantToShare&lt;/HostFolder&gt;<br>      &lt;SandboxFolder&gt;C:\Users\WDAGUtilityAccount\Desktop\MySharedFolder&lt;/SandboxFolder&gt;<br>      &lt;ReadOnly&gt;true&lt;/ReadOnly&gt;<br>    &lt;/MappedFolder&gt;<br>  &lt;/MappedFolders&gt;<br>&lt;/Configuration&gt;</pre><h4>Scripts: Your Sandbox Toolkit</h4><p>Remember, each time you exit the sandbox, it’s like a magic reset button — everything goes back to the way it was. But what if you need certain tools every time?</p><p><strong>Setting Up Tools with a Script:</strong></p><p>Let’s say you want Git, NVM, VS Code, and Windows Terminal in your sandbox. Easy!</p><p>1. Create a `<strong>.ps1</strong>` PowerShell script file.</p><p>2. Paste this script to install everything using <strong>Scoop</strong>:</p><pre>Set-ExecutionPolicy Bypass -Scope Process -Force<br>iwr -useb get.scoop.sh | iex<br>scoop install git<br>scoop bucket add extras<br>scoop install nvm<br>scoop install windows-terminal<br>scoop install vscode</pre><p>3. Check out <a href="https://scoop.sh/">Scoop’s website </a>for more tools.</p><p>4. Put the script in your shared folder, and run it with <strong>PowerShell</strong>.</p><h4>Pro Tip: Manual Execution is Key</h4><p>You might think about automating this script at startup, but trust me, it’s better to run it manually. This way, you can see what’s happening and catch any errors.</p><h3>Conclusion</h3><p>Windows Sandbox is an incredibly powerful tool for safely experimenting on your PC. Whether you’re a developer, a tech enthusiast, or just someone who loves to try new things without risk, this feature is a game-changer. So, why wait? Dive into Windows Sandbox and explore a world of possibilities with confidence!</p><p>What are you going to test first in your Windows Sandbox? Let your imagination run wild and share your experiences! 🚀🌐💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38dfa51aab77" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>