@aetherframework/middleware 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env.example ADDED
@@ -0,0 +1,88 @@
1
+ # ============================================
2
+ # AetherJS Framework Configuration
3
+ # ============================================
4
+
5
+ # Server Configuration
6
+ PORT=3001
7
+
8
+ # Security Configuration
9
+ JWT_SECRET=your-super-secret-jwt-key-change-in-production
10
+ SESSION_SECRET=your-super-secret-session-key-change-in-production
11
+
12
+ # CORS Configuration
13
+ CORS_ENABLED=true
14
+ CORS_ORIGIN=*
15
+ CORS_METHODS=GET,POST,PUT,DELETE,PATCH,OPTIONS
16
+ CORS_ALLOWED_HEADERS=Content-Type,Authorization
17
+ CORS_CREDENTIALS=true
18
+ CORS_MAX_AGE=86400
19
+ CORS_PREFLIGHT_CONTINUE=false
20
+ CORS_OPTIONS_STATUS=204
21
+
22
+ # Compression Configuration
23
+ COMPRESSION_ENABLED=true
24
+ COMPRESSION_THRESHOLD=1024
25
+ COMPRESSION_LEVEL=6
26
+ COMPRESSION_MEM_LEVEL=8
27
+ COMPRESSION_STRATEGY=0
28
+ COMPRESSION_CHUNK_SIZE=16384
29
+ COMPRESSION_WINDOW_BITS=15
30
+ COMPRESSION_GZIP=true
31
+ COMPRESSION_DEFLATE=false
32
+ COMPRESSION_BROTLI=false
33
+ COMPRESSION_TYPES=application/json,text/plain,text/html,text/css,application/javascript
34
+
35
+ # Session Configuration
36
+ SESSION_ENABLED=true
37
+ SESSION_MAX_AGE=86400000
38
+ SESSION_COOKIE_NAME=aether_sid
39
+
40
+ # Rate Limiting Configuration
41
+ RATE_LIMIT_ENABLED=true
42
+ RATE_LIMIT_WINDOW_MS=900000 # 15 minutes
43
+ RATE_LIMIT_MAX_REQUESTS=100
44
+ RATE_LIMIT_MESSAGE="Too many requests, please try again later."
45
+ RATE_LIMIT_STATUS_CODE=429
46
+ RATE_LIMIT_SKIP_SUCCESSFUL=false
47
+ RATE_LIMIT_SKIP_FAILED=false
48
+
49
+ # Security Headers Configuration
50
+ SECURITY_HSTS_ENABLED=true
51
+ SECURITY_HSTS_MAX_AGE=31536000
52
+ SECURITY_NO_SNIFF=true
53
+ SECURITY_XSS_FILTER=true
54
+ SECURITY_FRAMEGUARD_ACTION=DENY
55
+ SECURITY_HIDE_POWERED_BY=true
56
+ SECURITY_REFERRER_POLICY=strict-origin-when-cross-origin
57
+
58
+ # JWT Configuration
59
+ JWT_ENABLED=true
60
+ JWT_ALGORITHMS=HS256
61
+ JWT_AUDIENCE=
62
+ JWT_ISSUER=
63
+ JWT_EXPIRES_IN=7d
64
+ JWT_IGNORE_EXPIRATION=false
65
+ JWT_CREDENTIALS_REQUIRED=true
66
+ JWT_TOKEN_HEADER=authorization
67
+ JWT_TOKEN_QUERY=token
68
+ JWT_TOKEN_COOKIE=token
69
+
70
+ # Body Parser Configuration
71
+ BODY_ENABLE_JSON=true
72
+ BODY_LIMIT_JSON=1mb
73
+ JSON_STRICT=true
74
+ JSON_REVIVER=
75
+
76
+ BODY_ENABLE_URLENCODED=true
77
+ BODY_LIMIT_URLENCODED=1mb
78
+
79
+ BODY_ENABLE_TEXT=true
80
+ BODY_LIMIT_TEXT=1mb
81
+
82
+ BODY_ENABLE_RAW=true
83
+ BODY_LIMIT_RAW=10mb
84
+
85
+ # Development/Production Mode
86
+ NODE_ENV=development
87
+ DEBUG=false
88
+ LOG_LEVEL=info
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026-present, AetherFramework Contributors.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.