Skip to content

Commit 39be42d

Browse files
Add docs from gofiber/fiber@534aa88
1 parent fc562dc commit 39be42d

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

docs/core/api/app.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import Reference from '@site/src/components/reference';
1111

1212
### GetString
1313

14-
Returns `s` unchanged when [`Immutable`](./fiber.md#immutable) is disabled or `s` resides in read-only memory. Otherwise it returns a detached copy using `strings.Clone`.
14+
Returns `s` unchanged when [`Immutable`](./fiber.md#immutable) is disabled or `s` resides in read-only memory. Otherwise, it returns a detached copy using `strings.Clone`.
1515

1616
```go title="Signature"
1717
func (app *App) GetString(s string) string
1818
```
1919

2020
### GetBytes
2121

22-
Returns `b` unchanged when [`Immutable`](./fiber.md#immutable) is disabled or `b` resides in read-only memory. Otherwise it returns a detached copy.
22+
Returns `b` unchanged when [`Immutable`](./fiber.md#immutable) is disabled or `b` resides in read-only memory. Otherwise, it returns a detached copy.
2323

2424
```go title="Signature"
2525
func (app *App) GetBytes(b []byte) []byte

docs/core/api/ctx.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ Make copies or use the [**`Immutable`**](./fiber.md#immutable) setting instead.
796796

797797
### Fresh
798798

799-
When the response is still **fresh** in the client's cache **true** is returned, otherwise **false** is returned to indicate that the client cache is now stale and the full response should be sent.
799+
When the response is still **fresh** in the client's cache **true** is returned; otherwise, **false** is returned to indicate that the client cache is now stale and the full response should be sent.
800800

801801
When a client sends the Cache-Control: no-cache request header to indicate an end-to-end reload request, `Fresh` will return false to make handling these requests transparent.
802802

docs/core/api/services.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ After adding a service to the app configuration, Fiber starts it on launch and s
1010

1111
## Service Interface
1212

13-
The `Service` interface defines the methods a service must implement.
13+
The `Service` interface defines methods a service must implement.
1414

1515
### Definition
1616

docs/core/api/state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ func GetStateWithDefault[T any](s *State, key string, defaultVal T) T
464464
**Usage Example:**
465465

466466
```go
467-
// Retrieve a value with a default fallback.
467+
// Retrieve a value with a fallback.
468468
requestCount := GetStateWithDefault[int](app.State(), "requestCount", 0)
469469
fmt.Printf("Request Count: %d\n", requestCount)
470470
```

docs/core/extra/internal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ Reusing Context objects significantly reduces garbage collection overhead, ensur
265265

266266
## Preforking Mechanism
267267

268-
To take full advantage of multi‑core systems, Fiber offers a prefork mode. In this mode, the master process spawns several child processes that listen on the same port using OS features such as SO_REUSEPORT (or a fallback to SO_REUSEADDR).
268+
To take full advantage of multi‑core systems, Fiber offers a prefork mode. In this mode, the master process spawns several child processes that listen on the same port using OS features such as SO_REUSEPORT (or fall back to SO_REUSEADDR).
269269

270270
```mermaid
271271
flowchart LR

docs/core/guide/extractors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ Different extraction sources have different security properties and use cases:
201201
When using multiple sources, order them by your security preferences:
202202

203203
```go
204-
// Example: Prefer headers, fallback to cookies, then query
204+
// Example: Prefer headers, fall back to cookies, then query
205205
extractors.Chain(
206206
extractors.FromAuthHeader("Bearer"), // Standard auth
207207
extractors.FromCookie("auth_token"), // Secure storage

docs/core/middleware/csrf.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ You can create advanced extractors for use cases like JWT embedding or JSON body
300300
For applications that need to support both AJAX and form submissions:
301301

302302
```go
303-
// Try header first (AJAX), fallback to form (traditional forms)
303+
// Try header first (AJAX), fall back to form (traditional forms)
304304
app.Use(csrf.New(csrf.Config{
305305
Extractor: extractors.Chain(
306306
extractors.FromHeader("X-Csrf-Token"),

docs/core/whats_new.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ We've made some changes to the CORS middleware to improve its functionality and
11731173

11741174
#### New Struct Fields
11751175

1176-
- `Config.AllowPrivateNetwork`: This new field is a boolean that allows you to control whether private networks are allowed. This is related to the [Private Network Access (PNA)](https://wicg.github.io/private-network-access/) specification from the Web Incubator Community Group (WICG). When set to `true`, the CORS middleware will allow CORS preflight requests from private networks and respond with the `Access-Control-Allow-Private-Network: true` header. This could be useful in development environments or specific use cases, but should be done with caution due to potential security risks.
1176+
- `Config.AllowPrivateNetwork`: This new field is a boolean that allows you to control whether private networks are allowed. This is related to the [Private Network Access (PNA)](https://wicg.github.io/private-network-access/) specification from the [Web Incubator Community Group (WICG)](https://wicg.io/). When set to `true`, the CORS middleware will allow CORS preflight requests from private networks and respond with the `Access-Control-Allow-Private-Network: true` header. This could be useful in development environments or specific use cases, but should be done with caution due to potential security risks.
11771177

11781178
#### Updated Struct Fields
11791179

0 commit comments

Comments
 (0)