You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can read about contributing to the GlobalTagsAPI [here](https://docs.globaltags.xyz/api/custom-auth-provider/)!
3
+
You can read about contributing to the GlobalTagsAPI [here](https://docs.globaltags.xyz/api/custom-auth-provider/)!
4
+
5
+
### Naming Conventions
6
+
7
+
Previously, this project did not enforce strict conventions, which may have resulted in some inconsistencies across the codebase, such as variations in naming styles or file organization. While we are now adopting these standardized conventions to maintain consistency and improve readability, you may still encounter older patterns that deviate from the new guidelines.
8
+
9
+
-**Translations**: Use `snake_case` for all keys in translation files.
Copy file name to clipboardExpand all lines: docs/api/configuration-guide.md
+12-21Lines changed: 12 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,25 +40,6 @@ Defines all active rate-limiting rules.
40
40
41
41
---
42
42
43
-
### `roles.json`
44
-
45
-
This file lists all available roles for the system.
46
-
47
-
-**`name`**: Specifies the name of the role.
48
-
-**`permissions`**: A string array in PascalCase format, listing all the permissions assigned to the role.
49
-
Those are all valid permissions:
50
-
-`BypassValidation`
51
-
-`CustomIcon`
52
-
-`ManageBans`
53
-
-`ManageNotes`
54
-
-`ManageSubscriptions`
55
-
-`ManageRoles`
56
-
-`ManageTags`
57
-
-`ManageWatchlist`
58
-
-`ReportImmunity`
59
-
60
-
---
61
-
62
43
### `skus.json`
63
44
Lists all obtainable entitlement SKUs for subscription management.
64
45
@@ -76,13 +57,21 @@ Environment variables configure essential application settings. Below is a detai
76
57
### General Configuration
77
58
78
59
-**`GT_PORT`**: Specifies the port on which the API runs.
79
-
-**`GT_PROXY_IP_HEADER`**: The header name that may contain the client’s real IP address when behind a proxy.
80
60
-**`GT_STRICT_AUTH`**: Boolean that determines if unauthenticated requests are allowed on the `/players/:uuid` route. Set to `true` to require valid authorization for all requests.
81
61
-**`GT_LOG_LEVEL`**: Specifies the level of logging detail. Valid values: `Error`, `Warn`, `Info`, `Debug`.
62
+
-**`GT_BASE_URL`**: Defines the root URL of the API, excluding any trailing slashes. This is the URL where the API can be accessed and should be consistent with your deployment setup.
63
+
-**`GT_ICON_URL`**: Provides a URL template for accessing role icons. The `{role}` placeholder in the template will be dynamically replaced with the role name.
82
64
-**`GT_MONGODB_CONNECTION`** (**required**): MongoDB connection string. Follow the [MongoDB documentation](https://www.mongodb.com/docs/manual/reference/connection-string/) to construct this string.
83
65
84
66
---
85
67
68
+
### Proxy Settings
69
+
70
+
-**`GT_PROXY_ENABLED`**: Boolean that determines if the API should operate behind a proxy. Set to `true` to enable trusting a header for real client IPs.
71
+
-**`GT_PROXY_IP_HEADER`**: The name of the HTTP header that contains the real client IP address when the API is behind a proxy. Common values include `x-forwarded-for` or `cf-connecting-ip`. Defaults to `x-real-ip`.
72
+
73
+
---
74
+
86
75
### Tag Validation Settings
87
76
88
77
-**`GT_VALIDATION_TAG_MIN_LENGTH`**: Minimum character length for tags.
@@ -92,6 +81,7 @@ Environment variables configure essential application settings. Below is a detai
92
81
-**`GT_VALIDATION_ICON_MAX_RESOLUTION`**: Maximum resolution (e.g., `512` for 512x512) for custom icons.
93
82
-**`GT_VALIDATION_ICON_BLACKLIST`**: Array of disallowed default icons.
94
83
-**`GT_VALIDATION_NOTES_MAX_LENGTH`**: Maximum character length for staff notes.
84
+
-**`GT_VALIDATION_ROLE_NAME_MAX_LENGTH`**: Maximum character length for role names.
95
85
96
86
---
97
87
@@ -137,10 +127,10 @@ Environment variables configure essential application settings. Below is a detai
137
127
-**General**
138
128
-**`GT_DISCORD_BOT_ENABLED`**: Enables or disables the Discord bot.
139
129
-**`GT_DISCORD_BOT_TOKEN`**: Token used for bot authentication.
130
+
-**`GT_DISCORD_BOT_SERVER`**: ID of the main Discord guild for various feature including role synchronization.
140
131
141
132
-**Role Synchronization**
142
133
-**`GT_DISCORD_BOT_SYNCED_ROLES_ENABLED`**: Enables role synchronization between GlobalTags and Discord.
143
-
-**`GT_DISCORD_BOT_SYNCED_ROLES_GUILD`**: ID of the Discord guild for role synchronization.
144
134
-**`GT_DISCORD_BOT_SYNCED_ROLES_{ROLE}`**: Maps GlobalTags roles to Discord role IDs. Example:
145
135
```env
146
136
GT_DISCORD_BOT_SYNCED_ROLES_ADMIN=123456,987654
@@ -170,6 +160,7 @@ Environment variables configure essential application settings. Below is a detai
170
160
171
161
- **Account connections**:
172
162
- **`GT_DISCORD_BOT_ACCOUNT_CONNECTIONS_ENABLED`**: Enables or disables the ability for users to link their Discord account (via `/gt link discord` in-game or `/link` on Discord).
163
+
- **`GT_DISCORD_BOT_ACCOUNT_CONNECTIONS_HIDE_EMAILS`**: Enables or disables if emails should be redacted in the log or not.
173
164
- **`GT_DISCORD_BOT_ACCOUNT_CONNECTIONS_CHANNEL`**: Specifies the Discord channel ID where new account connection notifications are sent.
174
165
- **`GT_DISCORD_BOT_ACCOUNT_CONNECTIONS_ROLE`**: Defines the ID of a Discord role treated as a "Verified" role for linked accounts.
**Error message**: `You've entered a malformed authorization header!`
82
-
83
-
**Cause**: This error occurs when you either omit the `Authorization` header for a protected route or provide an invalid auth provider `id` that doesn't match any registered providers.
84
-
85
-
**Solution**: Ensure that the `Authorization` header follows the correct format:
86
-
87
-
```
88
-
Authorization: <auth provider id> <token>
89
-
```
90
-
Verify that the auth provider `id` is valid and corresponds to a registered provider.
91
-
92
-
---
93
-
94
-
### 2. **Database Connection Issue**
79
+
### 1. **Database Connection Issue**
95
80
96
81
**Error message**: `The database is not connected. Please try again later!`
97
82
@@ -101,7 +86,7 @@ Verify that the auth provider `id` is valid and corresponds to a registered prov
101
86
102
87
---
103
88
104
-
### 3. **Unknown Error**
89
+
### 2. **Unknown Error**
105
90
106
91
**Error message**: `An unknown error ocurred! Please try again later`
Copy file name to clipboardExpand all lines: docs/rules.md
+18-2Lines changed: 18 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,28 @@
2
2
3
3
The GlobalTags system is provided for use by players and developers in the Minecraft community. We allow a lot of freedom in the choice of tags, but there are some limits that must not be exceeded. Your use of the service is subject to the following conditions:
4
4
5
+
<divclass="annotate"markdown>
6
+
5
7
1. Advertisement of any kind **is allowed**.
6
8
2. Any form of racism/extremism is **not** allowed.
7
-
3. Curse words are allowed as long as they don't insult or target a specific user or group
8
-
4. Sharing any information about another person without their consent is **strictly forbidden**. This is also referred to as <u>doxing</u>.
9
+
3. Curse words are allowed as long as they don't insult or target a specific user or group.
10
+
4. Sharing sensitive information about any person, including yourself, is **strictly prohibited**, regardless of consent. This practice, commonly referred to as *doxing*, includes but is not limited to:
11
+
1. Full names
12
+
2. Telephone numbers
13
+
3. Addresses
14
+
4. Coordinates or any other means of sharing specific locations
9
15
5. Icons must not include inappropriate content, such as NSFW material, gore, or other offensive imagery.
10
16
6. You must not violate any applicable laws or regulations.
11
17
7. It is not allowed to exploit bugs or vulnerabilities within the API or mod implementation to gain unfair advantage.
18
+
8. Creating unnecessary whitespaces, whether intentionally or accidentally, is strongly discouraged. (1)
19
+
20
+
</div>
21
+
22
+
1. For example, avoid putting spaces after color codes as this results in a whitespace:
23
+
24
+
| ✅ | ❌ |
25
+
| :---: | :---: |
26
+
|`&5Test Tag`|`&5 Test Tag`|
27
+
|`<#ff0000>My cool tag!`|`<#ff0000> My cool tag!`|
12
28
13
29
Violating these rules may result in a permanent suspension from GlobalTags services, without any refunds for prior purchases. See <ahref="https://globaltags.xyz/legal/terms"target="_blank">General Terms and Conditions</a>
0 commit comments