<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sukma Wijaya Pratama</title>
    <description>The latest articles on DEV Community by Sukma Wijaya Pratama (@0x6clingsuma).</description>
    <link>https://dev.to/0x6clingsuma</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4108106%2Fa5a74736-93c2-46e6-9229-8ed80436e834.png</url>
      <title>DEV Community: Sukma Wijaya Pratama</title>
      <link>https://dev.to/0x6clingsuma</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/0x6clingsuma"/>
    <language>en</language>
    <item>
      <title>Supercharging Web Performance and Security with Tencent EdgeOne Makers: A Technical Deep Dive &amp; Tutorial</title>
      <dc:creator>Sukma Wijaya Pratama</dc:creator>
      <pubDate>Thu, 03 Sep 2026 13:25:48 +0000</pubDate>
      <link>https://dev.to/0x6clingsuma/supercharging-web-performance-and-security-with-tencent-edgeone-makers-a-technical-deep-dive--2dnm</link>
      <guid>https://dev.to/0x6clingsuma/supercharging-web-performance-and-security-with-tencent-edgeone-makers-a-technical-deep-dive--2dnm</guid>
      <description>&lt;p&gt;Introduction&lt;br&gt;
As modern web applications demand faster loading times and robust edge-level security, relying solely on traditional cloud infrastructure often introduces unnecessary latency and security bottlenecks. Serverless edge computing and integrated Content Delivery Networks (CDNs) have fundamentally transformed how developers deploy and protect web services.&lt;/p&gt;

&lt;p&gt;Through the Tencent EdgeOne Makers program, developers get access to enterprise-grade edge acceleration, Web Application Firewall (WAF) protections, and Serverless Edge Functions directly at edge locations worldwide. In this article, I will walk you through a technical breakdown of Tencent EdgeOne and a hands-on tutorial on setting up edge rules and serverless edge scripts to boost your project's performance.&lt;/p&gt;

&lt;p&gt;What makes Tencent EdgeOne Stand Out?&lt;/p&gt;

&lt;p&gt;Tencent EdgeOne integrates CDN performance optimization with deep layer-3 to layer-7 security protections into a single unified platform. Key features include:&lt;/p&gt;

&lt;p&gt;Edge Functions (Serverless Edge): Execute JavaScript/TypeScript code directly at edge nodes closest to the user, drastically reducing Round Trip Time (RTT).&lt;/p&gt;

&lt;p&gt;Smart Security &amp;amp; WAF Integration: Built-in protection against DDoS attacks, bot scraping, and SQL injections without requiring a separate reverse proxy or security vendor.&lt;/p&gt;

&lt;p&gt;Global Dynamic Acceleration: Intelligent routing algorithms that dynamically optimize network routes for both static assets and API requests.&lt;/p&gt;

&lt;p&gt;Granular Rule Engine: Precise control over caching policies, header manipulations, and URL rewrites based on incoming request parameters.&lt;/p&gt;

&lt;p&gt;Step-by-Step Tutorial: Deploying &amp;amp; Securing an Edge-Accelerated Web Project&lt;/p&gt;

&lt;p&gt;Step 1: Domain Onboarding and DNS Setup&lt;/p&gt;

&lt;p&gt;Log in to the Tencent EdgeOne Console.&lt;/p&gt;

&lt;p&gt;Add your custom domain name to the site management section.&lt;/p&gt;

&lt;p&gt;Update your domain’s Nameservers (NS) or add the provided CNAME record in your DNS provider to route global traffic through EdgeOne.&lt;/p&gt;

&lt;p&gt;Step 2: Configuring Edge Cache Rules&lt;br&gt;
To maximize cache hit ratios for static assets while keeping dynamic APIs fresh:&lt;/p&gt;

&lt;p&gt;Navigate to Rule Engine &amp;gt; Create Rule.&lt;/p&gt;

&lt;p&gt;Set the matching condition: File Extension matches png, jpg, css, js.&lt;/p&gt;

&lt;p&gt;Action: Set Cache TTL to 30 Days and enable Gzip / Brotli Compression.&lt;/p&gt;

&lt;p&gt;Create a second rule for API endpoints (URI Path starts with /api/) and set the cache action to Bypass Cache to preserve dynamic response freshness.&lt;/p&gt;

&lt;p&gt;Step 3: Implementing an Edge Function (Serverless Request Handling)&lt;br&gt;
Edge Functions allow you to manipulate request/response headers or handle light authentication right at the edge. Here is a simple Edge Function written for EdgeOne to inspect client headers and inject security headers into responses:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;JavaScript&lt;/span&gt;

&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fetch&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;respondWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;handleRequest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handleRequest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Fetch origin response&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Clone response headers to modify them&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;newHeaders&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Headers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Inject basic security headers at the edge&lt;/span&gt;
  &lt;span class="nx"&gt;newHeaders&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;X-Frame-Options&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;DENY&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;newHeaders&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;X-Content-Type-Options&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;nosniff&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;newHeaders&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Strict-Transport-Security&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;max-age=31536000; includeSubDomains&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;Step&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Activating&lt;/span&gt; &lt;span class="nx"&gt;Layer&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="nx"&gt;Security&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;Bot&lt;/span&gt; &lt;span class="nx"&gt;Protection&lt;/span&gt;

&lt;span class="nx"&gt;Head&lt;/span&gt; &lt;span class="nx"&gt;over&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;Security&lt;/span&gt; &lt;span class="nx"&gt;Controls&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;WAF&lt;/span&gt; &lt;span class="nx"&gt;Settings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="nx"&gt;Enable&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;OWASP&lt;/span&gt; &lt;span class="nx"&gt;Top&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="nx"&gt;Ruleset&lt;/span&gt; &lt;span class="kd"&gt;with&lt;/span&gt; &lt;span class="nx"&gt;Block&lt;/span&gt; &lt;span class="nx"&gt;mode&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;automatically&lt;/span&gt; &lt;span class="nx"&gt;filter&lt;/span&gt; &lt;span class="nx"&gt;out&lt;/span&gt; &lt;span class="nx"&gt;malicious&lt;/span&gt; &lt;span class="nx"&gt;injection&lt;/span&gt; &lt;span class="nx"&gt;payloads&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="nx"&gt;Enable&lt;/span&gt; &lt;span class="nx"&gt;Rate&lt;/span&gt; &lt;span class="nx"&gt;Limiting&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;protect&lt;/span&gt; &lt;span class="nx"&gt;endpoints&lt;/span&gt; &lt;span class="nx"&gt;against&lt;/span&gt; &lt;span class="nx"&gt;brute&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;force&lt;/span&gt; &lt;span class="nf"&gt;attacks &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;g&lt;/span&gt;&lt;span class="p"&gt;.,&lt;/span&gt; &lt;span class="nx"&gt;maximum&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="nx"&gt;requests&lt;/span&gt; &lt;span class="nx"&gt;per&lt;/span&gt; &lt;span class="nx"&gt;minute&lt;/span&gt; &lt;span class="nx"&gt;per&lt;/span&gt; &lt;span class="nx"&gt;IP&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;

&lt;span class="nx"&gt;Key&lt;/span&gt; &lt;span class="nx"&gt;Takeaways&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nx"&gt;Young&lt;/span&gt; &lt;span class="nx"&gt;Developers&lt;/span&gt;

&lt;span class="nx"&gt;Building&lt;/span&gt; &lt;span class="nx"&gt;web&lt;/span&gt; &lt;span class="nx"&gt;applications&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="mi"&gt;2026&lt;/span&gt; &lt;span class="nx"&gt;isn&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;t just about writing code locally; it&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="nx"&gt;about&lt;/span&gt; &lt;span class="nx"&gt;leveraging&lt;/span&gt; &lt;span class="nb"&gt;global&lt;/span&gt; &lt;span class="nx"&gt;edge&lt;/span&gt; &lt;span class="nx"&gt;infrastructure&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nx"&gt;Experiencing&lt;/span&gt; &lt;span class="nx"&gt;Tencent&lt;/span&gt; &lt;span class="nx"&gt;EdgeOne&lt;/span&gt; &lt;span class="nx"&gt;Makers&lt;/span&gt; &lt;span class="nx"&gt;demonstrates&lt;/span&gt; &lt;span class="nx"&gt;how&lt;/span&gt; &lt;span class="nx"&gt;accessible&lt;/span&gt; &lt;span class="nx"&gt;high&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;performance&lt;/span&gt; &lt;span class="nx"&gt;edge&lt;/span&gt; &lt;span class="nx"&gt;infrastructure&lt;/span&gt; &lt;span class="nx"&gt;has&lt;/span&gt; &lt;span class="nx"&gt;become&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nx"&gt;By&lt;/span&gt; &lt;span class="nx"&gt;running&lt;/span&gt; &lt;span class="nx"&gt;computational&lt;/span&gt; &lt;span class="nx"&gt;logic&lt;/span&gt; &lt;span class="nx"&gt;directly&lt;/span&gt; &lt;span class="nx"&gt;at&lt;/span&gt; &lt;span class="nx"&gt;edge&lt;/span&gt; &lt;span class="nx"&gt;nodes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;you&lt;/span&gt; &lt;span class="nx"&gt;eliminate&lt;/span&gt; &lt;span class="nx"&gt;origin&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt; &lt;span class="nx"&gt;overhead&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cut&lt;/span&gt; &lt;span class="nx"&gt;down&lt;/span&gt; &lt;span class="nx"&gt;cloud&lt;/span&gt; &lt;span class="nx"&gt;hosting&lt;/span&gt; &lt;span class="nx"&gt;costs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;ensure&lt;/span&gt; &lt;span class="nx"&gt;your&lt;/span&gt; &lt;span class="nx"&gt;end&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt; &lt;span class="nx"&gt;receive&lt;/span&gt; &lt;span class="nx"&gt;instant&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;secure&lt;/span&gt; &lt;span class="nx"&gt;responses&lt;/span&gt; &lt;span class="nx"&gt;regardless&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;their&lt;/span&gt; &lt;span class="nx"&gt;physical&lt;/span&gt; &lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="nx"&gt;Don&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;t let your code stay isolated on a single origin server—start experimenting with edge computing today!

  return new Response(response.body, {
    status: response.status,
    statusText: response.statusText,
    headers: newHeaders
  });
}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>tencentedgeone</category>
      <category>edgeonemakers</category>
      <category>codepolitan</category>
      <category>edgeone</category>
    </item>
  </channel>
</rss>
