[PR #39] [CLOSED] enhance: add '' to extra validated directives raw list #53

Closed
opened 2026-02-28 01:20:43 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tufanbarisyildirim/gonginx/pull/39
Author: @0xJacky
Created: 1/14/2024
Status: Closed

Base: masterHead: master


📝 Commits (1)

  • 6a105e8 enhance: add '' to extra validated directives raw list

📊 Changes

1 file changed (+7 additions, -3 deletions)

View changed files

📝 parser/valid_directives.go (+7 -3)

📄 Description

When parsing the following content in gonginx v2, it will throw a error: unknown directive '''' on line 3, column 5.

map $http_upgrade $connection_upgrade {
        default upgrade;
        ''      close;
}

However, this configuration is provided by https://nginx.org/en/docs/http/websocket.html. I think we can add a variable of extraValidDirectivesRawList in parser/valid_directives.go to handle these directives which are not defined in https://nginx.org/en/docs/dirindex.html.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/tufanbarisyildirim/gonginx/pull/39 **Author:** [@0xJacky](https://github.com/0xJacky) **Created:** 1/14/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`6a105e8`](https://github.com/tufanbarisyildirim/gonginx/commit/6a105e85b7c396c30362695aa6a72baa04e2c1b8) enhance: add '' to extra validated directives raw list ### 📊 Changes **1 file changed** (+7 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `parser/valid_directives.go` (+7 -3) </details> ### 📄 Description When parsing the following content in gonginx v2, it will throw a error: unknown directive '''' on line 3, column 5. ```nginx map $http_upgrade $connection_upgrade { default upgrade; '' close; } ``` However, this configuration is provided by https://nginx.org/en/docs/http/websocket.html. I think we can add a variable of `extraValidDirectivesRawList` in `parser/valid_directives.go` to handle these directives which are not defined in https://nginx.org/en/docs/dirindex.html. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 01:20:43 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gonginx#53
No description provided.