mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
chore(env): add example environment configuration files for backend and frontend
This commit is contained in:
@@ -64,7 +64,7 @@ You can configure Sharpbin using environment variables or `appsettings.json`. Wh
|
|||||||
#### Frontend (SharpbinV3.Client)
|
#### Frontend (SharpbinV3.Client)
|
||||||
|
|
||||||
- `VITE_API_URL`: The URL of the backend API (e.g., `http://localhost:8080`).
|
- `VITE_API_URL`: The URL of the backend API (e.g., `http://localhost:8080`).
|
||||||
- `VITE_ALLOWED_HOSTS`: A comma separated list of allowed hosts (e.g., `localhost,sharpbin.whoswhip.dev`)
|
- `VITE_ALLOWED_HOSTS`: A comma separated list of allowed hosts (e.g., `localhost,sharpbin.cc`)
|
||||||
- `VIEW_INTERNAL_API_KEY`: Enforces views to be counted/recorded only by the frontend, if set it needs to be the same for both backend and frontend.
|
- `VIEW_INTERNAL_API_KEY`: Enforces views to be counted/recorded only by the frontend, if set it needs to be the same for both backend and frontend.
|
||||||
|
|
||||||
The frontend will be accessible at http://localhost:5173.
|
The frontend will be accessible at http://localhost:5173.
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# Required Misc. Variables
|
||||||
|
Domain=example.com
|
||||||
|
Https=true
|
||||||
|
JwtSettings__Secret=totally_random_and_secure_string
|
||||||
|
|
||||||
|
# Auth Settings
|
||||||
|
AuthSettings__CF_Turnstile_SecretKey=1x0000000000000000000000000000000AA
|
||||||
|
AuthSettings__CF_Turnstile_SiteKey=3x00000000000000000000FF
|
||||||
|
AuthSettings__Registration_Enabled=true
|
||||||
|
AuthSettings__Admins_Require_2FA=true
|
||||||
|
AuthSettings__API_Key_HMAC_Secret=another_random_and_secure_string
|
||||||
|
|
||||||
|
# Paste Settings
|
||||||
|
PasteSettings__MaxTitleLength=500
|
||||||
|
PasteSettings__MaxPasteSizeInBytes=1048576
|
||||||
|
PasteSettings__EnablePasteCompression=true
|
||||||
|
PasteSettings__RequiresVerification=true
|
||||||
|
PasteSettings__View_HMAC_Secret=random_minimum_32_char_string
|
||||||
|
# Used so that views are only counted from the frontend
|
||||||
|
# Must be the same on both the frontend and backend environment
|
||||||
|
PasteSettings__View_Internal_API_Key=another_random_minimum_32_char_string
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
VITE_ALLOWED_HOSTS=localhost,example.com
|
||||||
|
# Used so that views are only counted from the frontend
|
||||||
|
# Must be the same on both the frontend and backend environment
|
||||||
|
# The frontend will also try to parse 'PasteSettings__View_Internal_API_Key'
|
||||||
|
VIEW_INTERNAL_API_KEY=another_random_minimum_32_char_string
|
||||||
Reference in New Issue
Block a user