mirror of
https://github.com/hanzoai/base.git
synced 2026-10-21 03:41:50 +00:00
fix: vendor-neutral branding — remove all hardcoded "Hanzo Base"
Replace "Hanzo Base" fallbacks with generic "Base" in all Svelte UI components. When $appName is set (e.g. "<tenant>"), it displays that instead. Help text uses "the application" rather than a brand. Files: App.svelte, FullPage.svelte, PageWrapper.svelte, index.html, PageBackups, PageStorage, PageMail, TrustedProxyAccordion, CollectionRulesTab, LarkOptions, PageExportCollections
This commit is contained in:
@@ -241,6 +241,10 @@ func Register(app core.App, config PlatformConfig) error {
|
||||
re.Request.Header.Set("X-User-Email", email)
|
||||
}
|
||||
}
|
||||
// Preserve gateway-injected identity headers if Base auth didn't resolve.
|
||||
// The gateway validates the JWT and sets X-User-Id from the sub claim.
|
||||
// This is the standard path for IAM-authenticated requests.
|
||||
// Do NOT clear headers that the gateway already set.
|
||||
return re.Next()
|
||||
},
|
||||
})
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>Hanzo Base</title>
|
||||
<title>Base</title>
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
|
||||
+2
-2
@@ -70,7 +70,7 @@
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{CommonHelper.joinNonEmpty([$pageTitle, $appName, "Hanzo Base"], " - ", false)}</title>
|
||||
<title>{CommonHelper.joinNonEmpty([$pageTitle, $appName, "Base"], " - ", false)}</title>
|
||||
|
||||
{#if window.location.protocol == "https:"}
|
||||
<link
|
||||
@@ -87,7 +87,7 @@
|
||||
<a href="/" class="logo logo-sm" use:link>
|
||||
<img
|
||||
src={$logoUrl || `${import.meta.env.BASE_URL}images/logo.svg`}
|
||||
alt={$appName || "Hanzo Base"}
|
||||
alt={$appName || "Base"}
|
||||
width="40"
|
||||
height="40"
|
||||
/>
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
<figure class="logo">
|
||||
<img
|
||||
src={$logoUrl || `${import.meta.env.BASE_URL}images/logo.svg`}
|
||||
alt={$appName || "Hanzo Base"}
|
||||
alt={$appName || "Base"}
|
||||
width="40"
|
||||
height="40"
|
||||
/>
|
||||
<span class="txt"><strong>{$appName || "Hanzo Base"}</strong></span>
|
||||
<span class="txt"><strong>{$appName || "Base"}</strong></span>
|
||||
</figure>
|
||||
</div>
|
||||
<div class="clearfix" />
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</a>
|
||||
<span class="delimiter">|</span>
|
||||
<a href={import.meta.env.HZ_RELEASES} target="_blank" rel="noopener noreferrer" title="Releases">
|
||||
<span class="txt">Hanzo Base {import.meta.env.HZ_VERSION}</span>
|
||||
<span class="txt">Base {import.meta.env.HZ_VERSION}</span>
|
||||
</a>
|
||||
{/if}
|
||||
</footer>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<p>
|
||||
All rules follow the
|
||||
<a href={import.meta.env.HZ_RULES_SYNTAX_DOCS} target="_blank" rel="noopener noreferrer">
|
||||
Hanzo Base filter syntax and operators
|
||||
Base filter syntax and operators
|
||||
</a>.
|
||||
</p>
|
||||
<button
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
<div class="content">
|
||||
Note that the Lark user's <strong>Union ID</strong> will be used for the association with the
|
||||
Hanzo Base user (see
|
||||
Base user (see
|
||||
<a
|
||||
href="https://open.feishu.cn/document/platform-overveiw/basic-concepts/user-identity-introduction/introduction#3f2d4b63"
|
||||
target="_blank"
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
<div class="wrapper">
|
||||
<div class="panel" autocomplete="off" on:submit|preventDefault={save}>
|
||||
<div class="flex m-b-sm flex-gap-10">
|
||||
<span class="txt-xl">Backup and restore your Hanzo Base data</span>
|
||||
<span class="txt-xl">Backup and restore your data</span>
|
||||
<RefreshButton class="btn-sm" tooltip={"Refresh"} on:refresh={refreshList} />
|
||||
<BackupUploadButton class="btn-sm" on:success={refreshList} />
|
||||
</div>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
<div class="content txt-xl m-b-base">
|
||||
<p>
|
||||
Below you'll find your current collections configuration that you could import in
|
||||
another Hanzo Base environment.
|
||||
another Base environment.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
<i
|
||||
class="ri-information-line link-hint"
|
||||
use:tooltip={{
|
||||
text: 'By default Hanzo Base uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',
|
||||
text: 'By default the application uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',
|
||||
position: "top",
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<div class="wrapper">
|
||||
<form class="panel" autocomplete="off" on:submit|preventDefault={() => save()}>
|
||||
<div class="content txt-xl m-b-base">
|
||||
<p>By default Hanzo Base uses the local file system to store uploaded files.</p>
|
||||
<p>By default the application uses the local file system to store uploaded files.</p>
|
||||
<p>
|
||||
If you have limited disk space, you could optionally connect to an S3 compatible storage.
|
||||
</p>
|
||||
|
||||
@@ -98,21 +98,21 @@
|
||||
|
||||
<div class="content m-b-sm">
|
||||
<p>
|
||||
When Hanzo Base is deployed on platforms like Fly or it is accessible through proxies such as
|
||||
When the application is deployed on platforms like Fly or it is accessible through proxies such as
|
||||
NGINX, requests from different users will originate from the same IP address (the IP of the proxy
|
||||
connecting to your Hanzo Base app).
|
||||
connecting to your app).
|
||||
</p>
|
||||
<p>
|
||||
In this case to retrieve the actual user IP (used for rate limiting, logging, etc.) you need to
|
||||
properly configure your proxy and list below the trusted headers that Hanzo Base could use to
|
||||
properly configure your proxy and list below the trusted headers that the application could use to
|
||||
extract the user IP.
|
||||
</p>
|
||||
<p class="txt-bold">When using such proxy, to avoid spoofing it is recommended to:</p>
|
||||
<ul class="m-t-0 txt-bold">
|
||||
<li>use headers that are controlled only by the proxy and cannot be manually set by the users</li>
|
||||
<li>make sure that the Hanzo Base server can be accessed only through the proxy</li>
|
||||
<li>make sure that the server can be accessed only through the proxy</li>
|
||||
</ul>
|
||||
<p>You can clear the headers field if Hanzo Base is not deployed behind a proxy.</p>
|
||||
<p>You can clear the headers field if the application is not deployed behind a proxy.</p>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-sm">
|
||||
|
||||
Reference in New Issue
Block a user