mirror of
https://github.com/lus/pasty.git
synced 2023-08-10 21:13:09 +03:00
remove deletion token notation support
This commit is contained in:
parent
1d2e42b737
commit
1a574add49
18
README.md
18
README.md
@ -1,22 +1,6 @@
|
||||
# pasty
|
||||
Pasty is a fast and lightweight code pasting server
|
||||
|
||||
## !!! Important deprecation notices !!!
|
||||
|
||||
> This version of pasty uses a new field name for the so far called `deletionToken`: `modificationToken`.
|
||||
> Instances using **PostgreSQL** are **not affected** as a corresponding SQL migration will run before the first startup.
|
||||
> If you however use **another storage driver** you may have to **update the entries** by hand or using a simple query, depending on your driver as I don't plan to ship migrations for every single storage driver.
|
||||
> It may be important to know that the **data migrator has been upgraded** too. This may serve as a **convenient workaround** (export data (field will be renamed) and import data with changed field names again).
|
||||
>
|
||||
> The old `deletionToken` field will be processed corresponding to these changes but I strongly recommend updating old pastes if possible.
|
||||
|
||||
> Additionally, I changed the three `DELETION_TOKEN*`environment variables to their corresponding `MODIFICATION_TOKEN*` ones:
|
||||
> - `DELETION_TOKENS` -> `MODIFICATION_TOKENS`
|
||||
> - `DELETION_TOKEN_MASTER` -> `MODIFICATION_TOKEN_MASTER`
|
||||
> - `DELETION_TOKEN_LENGTH` -> `MODIFICATION_TOKEN_LENGTH`
|
||||
>
|
||||
> Again, **the old ones will still work** because I do not want to jumble your configurations. However, **please consider updating** them to stay future-proof ^^.
|
||||
|
||||
pasty is a fast and lightweight code pasting server.
|
||||
|
||||
## Support
|
||||
|
||||
|
@ -84,12 +84,12 @@ func Load() {
|
||||
HastebinSupport: env.MustBool("HASTEBIN_SUPPORT", false),
|
||||
IDLength: env.MustInt("ID_LENGTH", 6),
|
||||
IDCharacters: env.MustString("ID_CHARACTERS", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"),
|
||||
ModificationTokens: env.MustBool("MODIFICATION_TOKENS", env.MustBool("DELETION_TOKENS", true)), // ---
|
||||
ModificationTokenMaster: env.MustString("MODIFICATION_TOKEN_MASTER", env.MustString("DELETION_TOKEN_MASTER", "")), // - We don't want to destroy peoples old configuration
|
||||
ModificationTokenLength: env.MustInt("MODIFICATION_TOKEN_LENGTH", env.MustInt("DELETION_TOKEN_LENGTH", 12)), // ---
|
||||
ModificationTokens: env.MustBool("MODIFICATION_TOKENS", true),
|
||||
ModificationTokenMaster: env.MustString("MODIFICATION_TOKEN_MASTER", ""),
|
||||
ModificationTokenLength: env.MustInt("MODIFICATION_TOKEN_LENGTH", 12),
|
||||
ModificationTokenCharacters: env.MustString("MODIFICATION_TOKEN_CHARACTERS", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"),
|
||||
RateLimit: env.MustString("RATE_LIMIT", "30-M"),
|
||||
LengthCap: env.MustInt("LENGTH_CAP", 50_000),
|
||||
LengthCap: env.MustInt("LENGTH_CAP", 50000),
|
||||
AutoDelete: &AutoDeleteConfig{
|
||||
Enabled: env.MustBool("AUTODELETE", false),
|
||||
Lifetime: env.MustDuration("AUTODELETE_LIFETIME", 720*time.Hour),
|
||||
|
Loading…
Reference in New Issue
Block a user