This commit is contained in:
wayneshn
2025-09-04 14:44:35 +00:00
parent 646ded322a
commit 77fb467b51
32 changed files with 133 additions and 98 deletions

View File

@@ -9,7 +9,7 @@
<link rel="preload stylesheet" href="/assets/style.BZzyQG4l.css" as="style">
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
<script type="module" src="/assets/app.BdgHdIE0.js"></script>
<script type="module" src="/assets/app.NIqer7g1.js"></script>
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<script defer src="https://analytics.zenceipt.com/script.js" data-website-id="2c8b452e-eab5-4f82-8ead-902d8f8b976f"></script>
<link rel="icon" href="/logo-sq.svg">
@@ -18,7 +18,7 @@
</head>
<body>
<div id="app"></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"api_archived-email.md\":\"rYKCgF6R\",\"api_auth.md\":\"BqZ6wN0q\",\"api_authentication.md\":\"CyDXtQYg\",\"api_dashboard.md\":\"lu70c-Pf\",\"api_index.md\":\"DFnFK07E\",\"api_ingestion.md\":\"B8EOVCr7\",\"api_search.md\":\"B8tLtEbg\",\"api_storage.md\":\"DKUKvFrO\",\"index.md\":\"9PKJf5H1\",\"services_iam-service.md\":\"DLjefPo_\",\"services_iam-service_iam-policy.md\":\"BMP46V9x\",\"services_index.md\":\"BLn224J3\",\"services_storage-service.md\":\"Bgos1Y2E\",\"summary.md\":\"5seSND4L\",\"user-guides_email-providers_eml.md\":\"a288N17s\",\"user-guides_email-providers_google-workspace.md\":\"BWo_12De\",\"user-guides_email-providers_imap.md\":\"DnuaRv-0\",\"user-guides_email-providers_index.md\":\"DLhwJ4vK\",\"user-guides_email-providers_microsoft-365.md\":\"QHHVfYxW\",\"user-guides_email-providers_pst.md\":\"c6jOF8P1\",\"user-guides_installation.md\":\"BuO7QeKe\",\"user-guides_settings_system.md\":\"DZw4puzm\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Open Archiver Docs\",\"description\":\"Official documentation for the Open Archiver project.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"search\":{\"provider\":\"local\"},\"logo\":{\"src\":\"/logo-sq.svg\"},\"nav\":[{\"text\":\"Home\",\"link\":\"/\"},{\"text\":\"Github\",\"link\":\"https://github.com/LogicLabs-OU/OpenArchiver\"},{\"text\":\"Website\",\"link\":\"https://openarchiver.com/\"},{\"text\":\"Discord\",\"link\":\"https://discord.gg/MTtD7BhuTQ\"}],\"sidebar\":[{\"text\":\"User Guides\",\"items\":[{\"text\":\"Get Started\",\"link\":\"/\"},{\"text\":\"Installation\",\"link\":\"/user-guides/installation\"},{\"text\":\"Email Providers\",\"link\":\"/user-guides/email-providers/\",\"collapsed\":true,\"items\":[{\"text\":\"Generic IMAP Server\",\"link\":\"/user-guides/email-providers/imap\"},{\"text\":\"Google Workspace\",\"link\":\"/user-guides/email-providers/google-workspace\"},{\"text\":\"Microsoft 365\",\"link\":\"/user-guides/email-providers/microsoft-365\"},{\"text\":\"EML Import\",\"link\":\"/user-guides/email-providers/eml\"},{\"text\":\"PST Import\",\"link\":\"/user-guides/email-providers/pst\"}]},{\"text\":\"Settings\",\"collapsed\":true,\"items\":[{\"text\":\"System\",\"link\":\"/user-guides/settings/system\"}]}]},{\"text\":\"API Reference\",\"items\":[{\"text\":\"Overview\",\"link\":\"/api/\"},{\"text\":\"Authentication\",\"link\":\"/api/authentication\"},{\"text\":\"Auth\",\"link\":\"/api/auth\"},{\"text\":\"Archived Email\",\"link\":\"/api/archived-email\"},{\"text\":\"Dashboard\",\"link\":\"/api/dashboard\"},{\"text\":\"Ingestion\",\"link\":\"/api/ingestion\"},{\"text\":\"Search\",\"link\":\"/api/search\"},{\"text\":\"Storage\",\"link\":\"/api/storage\"}]},{\"text\":\"Services\",\"items\":[{\"text\":\"Overview\",\"link\":\"/services/\"},{\"text\":\"Storage Service\",\"link\":\"/services/storage-service\"},{\"text\":\"IAM Service\",\"items\":[{\"text\":\"IAM Policies\",\"link\":\"/services/iam-service/iam-policy\"}]}]}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"api_archived-email.md\":\"rYKCgF6R\",\"api_auth.md\":\"BqZ6wN0q\",\"api_authentication.md\":\"CyDXtQYg\",\"api_dashboard.md\":\"lu70c-Pf\",\"api_index.md\":\"DFnFK07E\",\"api_ingestion.md\":\"B8EOVCr7\",\"api_rate-limiting.md\":\"BE4ZWqta\",\"api_search.md\":\"B8tLtEbg\",\"api_storage.md\":\"DKUKvFrO\",\"index.md\":\"9PKJf5H1\",\"services_iam-service.md\":\"DLjefPo_\",\"services_iam-service_iam-policy.md\":\"BMP46V9x\",\"services_index.md\":\"BLn224J3\",\"services_storage-service.md\":\"Bgos1Y2E\",\"summary.md\":\"5seSND4L\",\"user-guides_email-providers_eml.md\":\"a288N17s\",\"user-guides_email-providers_google-workspace.md\":\"BWo_12De\",\"user-guides_email-providers_imap.md\":\"DnuaRv-0\",\"user-guides_email-providers_index.md\":\"DLhwJ4vK\",\"user-guides_email-providers_microsoft-365.md\":\"QHHVfYxW\",\"user-guides_email-providers_pst.md\":\"c6jOF8P1\",\"user-guides_installation.md\":\"BuO7QeKe\",\"user-guides_settings_system.md\":\"DZw4puzm\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Open Archiver Docs\",\"description\":\"Official documentation for the Open Archiver project.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"search\":{\"provider\":\"local\"},\"logo\":{\"src\":\"/logo-sq.svg\"},\"nav\":[{\"text\":\"Home\",\"link\":\"/\"},{\"text\":\"Github\",\"link\":\"https://github.com/LogicLabs-OU/OpenArchiver\"},{\"text\":\"Website\",\"link\":\"https://openarchiver.com/\"},{\"text\":\"Discord\",\"link\":\"https://discord.gg/MTtD7BhuTQ\"}],\"sidebar\":[{\"text\":\"User Guides\",\"items\":[{\"text\":\"Get Started\",\"link\":\"/\"},{\"text\":\"Installation\",\"link\":\"/user-guides/installation\"},{\"text\":\"Email Providers\",\"link\":\"/user-guides/email-providers/\",\"collapsed\":true,\"items\":[{\"text\":\"Generic IMAP Server\",\"link\":\"/user-guides/email-providers/imap\"},{\"text\":\"Google Workspace\",\"link\":\"/user-guides/email-providers/google-workspace\"},{\"text\":\"Microsoft 365\",\"link\":\"/user-guides/email-providers/microsoft-365\"},{\"text\":\"EML Import\",\"link\":\"/user-guides/email-providers/eml\"},{\"text\":\"PST Import\",\"link\":\"/user-guides/email-providers/pst\"}]},{\"text\":\"Settings\",\"collapsed\":true,\"items\":[{\"text\":\"System\",\"link\":\"/user-guides/settings/system\"}]}]},{\"text\":\"API Reference\",\"items\":[{\"text\":\"Overview\",\"link\":\"/api/\"},{\"text\":\"Authentication\",\"link\":\"/api/authentication\"},{\"text\":\"Rate Limiting\",\"link\":\"/api/rate-limiting\"},{\"text\":\"Auth\",\"link\":\"/api/auth\"},{\"text\":\"Archived Email\",\"link\":\"/api/archived-email\"},{\"text\":\"Dashboard\",\"link\":\"/api/dashboard\"},{\"text\":\"Ingestion\",\"link\":\"/api/ingestion\"},{\"text\":\"Search\",\"link\":\"/api/search\"},{\"text\":\"Storage\",\"link\":\"/api/storage\"}]},{\"text\":\"Services\",\"items\":[{\"text\":\"Overview\",\"link\":\"/services/\"},{\"text\":\"Storage Service\",\"link\":\"/services/storage-service\"},{\"text\":\"IAM Service\",\"items\":[{\"text\":\"IAM Policies\",\"link\":\"/services/iam-service/iam-policy\"}]}]}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

30
api/rate-limiting.html Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,4 @@
import{_ as i,c as t,o as a,ag as s}from"./chunks/framework.S-Qvb3wi.js";const p=JSON.parse('{"title":"Rate Limiting","description":"","frontmatter":{},"headers":[],"relativePath":"api/rate-limiting.md","filePath":"api/rate-limiting.md"}'),n={name:"api/rate-limiting.md"};function o(r,e,l,d,h,c){return a(),t("div",null,e[0]||(e[0]=[s(`<h1 id="rate-limiting" tabindex="-1">Rate Limiting <a class="header-anchor" href="#rate-limiting" aria-label="Permalink to &quot;Rate Limiting&quot;"></a></h1><p>The API implements rate limiting as a security measure to protect your instance from denial-of-service (DoS) and brute-force attacks. This is a crucial feature for maintaining the security and stability of the application.</p><h2 id="how-it-works" tabindex="-1">How It Works <a class="header-anchor" href="#how-it-works" aria-label="Permalink to &quot;How It Works&quot;"></a></h2><p>The rate limiter restricts the number of requests an IP address can make within a specific time frame. These limits are configurable via environment variables to suit your security needs.</p><p>By default, the limits are:</p><ul><li><strong>100 requests</strong> per <strong>15 minutes</strong> per IP address.</li></ul><p>If this limit is exceeded, the API will respond with an HTTP <code>429 Too Many Requests</code> status code.</p><h3 id="response-body" tabindex="-1">Response Body <a class="header-anchor" href="#response-body" aria-label="Permalink to &quot;Response Body&quot;"></a></h3><p>When an IP address is rate-limited, the API will return a JSON response with the following format:</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;status&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">429</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;message&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Too many requests from this IP, please try again after 15 minutes&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="configuration" tabindex="-1">Configuration <a class="header-anchor" href="#configuration" aria-label="Permalink to &quot;Configuration&quot;"></a></h2><p>You can customize the rate-limiting settings by setting the following environment variables in your <code>.env</code> file:</p><ul><li><code>RATE_LIMIT_WINDOW_MS</code>: The time window in milliseconds. Defaults to <code>900000</code> (15 minutes).</li><li><code>RATE_LIMIT_MAX_REQUESTS</code>: The maximum number of requests allowed per IP address within the time window. Defaults to <code>100</code>.</li></ul><h2 id="handling-rate-limits" tabindex="-1">Handling Rate Limits <a class="header-anchor" href="#handling-rate-limits" aria-label="Permalink to &quot;Handling Rate Limits&quot;"></a></h2><p>If you are developing a client that interacts with the API, you should handle rate limiting gracefully:</p><ol><li><strong>Check the Status Code</strong>: Monitor for a <code>429</code> HTTP status code in responses.</li><li><strong>Implement a Retry Mechanism</strong>: When you receive a <code>429</code> response, it is best practice to wait before retrying the request. Implementing an exponential backoff strategy is recommended.</li><li><strong>Check Headers</strong>: The response will include the following standard headers to help you manage your request rate: <ul><li><code>RateLimit-Limit</code>: The maximum number of requests allowed in the current window.</li><li><code>RateLimit-Remaining</code>: The number of requests you have left in the current window.</li><li><code>RateLimit-Reset</code>: The time when the rate limit window will reset, in UTC epoch seconds.</li></ul></li></ol><h2 id="excluded-endpoints" tabindex="-1">Excluded Endpoints <a class="header-anchor" href="#excluded-endpoints" aria-label="Permalink to &quot;Excluded Endpoints&quot;"></a></h2><p>Certain essential endpoints are excluded from rate limiting to ensure the application&#39;s UI remains responsive. These are:</p><ul><li><code>/auth/status</code></li><li><code>/settings/system</code></li></ul><p>These endpoints can be called as needed without affecting your rate limit count.</p>`,20)]))}const m=i(n,[["render",o]]);export{p as __pageData,m as default};

View File

@@ -0,0 +1 @@
import{_ as i,c as t,o as a,ag as s}from"./chunks/framework.S-Qvb3wi.js";const p=JSON.parse('{"title":"Rate Limiting","description":"","frontmatter":{},"headers":[],"relativePath":"api/rate-limiting.md","filePath":"api/rate-limiting.md"}'),n={name:"api/rate-limiting.md"};function o(r,e,l,d,h,c){return a(),t("div",null,e[0]||(e[0]=[s("",20)]))}const m=i(n,[["render",o]]);export{p as __pageData,m as default};

View File

@@ -1 +1 @@
import{t as p}from"./chunks/theme.Hkf_zFEe.js";import{R as s,a2 as i,a3 as u,a4 as c,a5 as l,a6 as f,a7 as d,a8 as m,a9 as h,aa as g,ab as A,d as v,u as y,v as C,s as P,ac as b,ad as w,ae as R,af as E}from"./chunks/framework.S-Qvb3wi.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{P(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),R(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function _(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp};
import{t as p}from"./chunks/theme.BWeWAo5W.js";import{R as s,a2 as i,a3 as u,a4 as c,a5 as l,a6 as f,a7 as d,a8 as m,a9 as h,aa as g,ab as A,d as v,u as y,v as C,s as P,ac as b,ad as w,ae as R,af as E}from"./chunks/framework.S-Qvb3wi.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{P(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),R(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function _(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"api_archived-email.md":"rYKCgF6R","api_auth.md":"BqZ6wN0q","api_authentication.md":"CyDXtQYg","api_dashboard.md":"lu70c-Pf","api_index.md":"DFnFK07E","api_ingestion.md":"B8EOVCr7","api_search.md":"B8tLtEbg","api_storage.md":"DKUKvFrO","index.md":"9PKJf5H1","services_iam-service.md":"DLjefPo_","services_iam-service_iam-policy.md":"BMP46V9x","services_index.md":"BLn224J3","services_storage-service.md":"Bgos1Y2E","summary.md":"5seSND4L","user-guides_email-providers_eml.md":"a288N17s","user-guides_email-providers_google-workspace.md":"BWo_12De","user-guides_email-providers_imap.md":"DnuaRv-0","user-guides_email-providers_index.md":"DLhwJ4vK","user-guides_email-providers_microsoft-365.md":"QHHVfYxW","user-guides_email-providers_pst.md":"c6jOF8P1","user-guides_installation.md":"BuO7QeKe","user-guides_settings_system.md":"DZw4puzm"}
{"api_archived-email.md":"rYKCgF6R","api_auth.md":"BqZ6wN0q","api_authentication.md":"CyDXtQYg","api_dashboard.md":"lu70c-Pf","api_index.md":"DFnFK07E","api_ingestion.md":"B8EOVCr7","api_rate-limiting.md":"BE4ZWqta","api_search.md":"B8tLtEbg","api_storage.md":"DKUKvFrO","index.md":"9PKJf5H1","services_iam-service.md":"DLjefPo_","services_iam-service_iam-policy.md":"BMP46V9x","services_index.md":"BLn224J3","services_storage-service.md":"Bgos1Y2E","summary.md":"5seSND4L","user-guides_email-providers_eml.md":"a288N17s","user-guides_email-providers_google-workspace.md":"BWo_12De","user-guides_email-providers_imap.md":"DnuaRv-0","user-guides_email-providers_index.md":"DLhwJ4vK","user-guides_email-providers_microsoft-365.md":"QHHVfYxW","user-guides_email-providers_pst.md":"c6jOF8P1","user-guides_installation.md":"BuO7QeKe","user-guides_settings_system.md":"DZw4puzm"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long