-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config: Improve env config to support multi values. v7.0.2 #4092
Merged
winlinvip
merged 3 commits into
ossrs:develop
from
suzp1984:fix/http_hooks_env_overwriten
Aug 13, 2024
Merged
Config: Improve env config to support multi values. v7.0.2 #4092
winlinvip
merged 3 commits into
ossrs:develop
from
suzp1984:fix/http_hooks_env_overwriten
Aug 13, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
suzp1984
force-pushed
the
fix/http_hooks_env_overwriten
branch
from
June 16, 2024 14:33
5f6f0a9
to
5ba500c
Compare
suzp1984
force-pushed
the
fix/http_hooks_env_overwriten
branch
from
July 16, 2024 14:53
5ba500c
to
f33f1ad
Compare
winlinvip
reviewed
Aug 12, 2024
winlinvip
changed the title
fix http_hooks env don't support multi values;
Config: Fix http_hooks env don't support multi values;
Aug 12, 2024
winlinvip
changed the title
Config: Fix http_hooks env don't support multi values;
Config: Improve env config to support multi values
Aug 12, 2024
winlinvip
force-pushed
the
develop
branch
2 times, most recently
from
August 12, 2024 10:42
0bb9637
to
2e211f6
Compare
let http_hooks env overwrite support multi values; e.g. SRS_VHOST_HTTP_HOOKS_ON_CONNECT="http://127.0.0.1/api/connect http://localhost/api/connect"
suzp1984
force-pushed
the
fix/http_hooks_env_overwriten
branch
from
August 12, 2024 12:19
f33f1ad
to
b49ed17
Compare
winlinvip
changed the title
Config: Improve env config to support multi values
Config: Improve env config to support multi values. v7.0.2
Aug 13, 2024
winlinvip
approved these changes
Aug 13, 2024
winlinvip
added a commit
that referenced
this pull request
Aug 13, 2024
1. add on_connect & on_close directives to conf/full.conf; 2. let http_hooks env overwrite support multi values; e.g. SRS_VHOST_HTTP_HOOKS_ON_CONNECT="http://127.0.0.1/api/connect http://localhost/api/connect" related to #1222 (comment) Above comments said `http_hook` env may not works as expected, as I found there are still has some issue in `http_hooks` env configuration, but this PR may not target above problem. --------- Co-authored-by: winlin <winlinvip@gmail.com>
winlinvip
added a commit
that referenced
this pull request
Aug 15, 2024
1. don't use static variable to store the result; 2. add more UT to handle the multi value and values with whitespaces; related to #4092 https://github.com/ossrs/srs/blob/16e569d82357757ddac6ef91d7a5fe7837319909/trunk/src/app/srs_app_config.cpp#L71-L82 `static SrsConfDirective* dir` removed, this static var here is to avoid the memory leak, I add the `SrsConfDirective` instance to the `env_dirs` directive container, which will destroy itself inside `SrsConfig` destructor. --------- Co-authored-by: winlin <winlinvip@gmail.com>
winlinvip
added a commit
that referenced
this pull request
Aug 15, 2024
1. don't use static variable to store the result; 2. add more UT to handle the multi value and values with whitespaces; related to #4092 https://github.com/ossrs/srs/blob/16e569d82357757ddac6ef91d7a5fe7837319909/trunk/src/app/srs_app_config.cpp#L71-L82 `static SrsConfDirective* dir` removed, this static var here is to avoid the memory leak, I add the `SrsConfDirective` instance to the `env_dirs` directive container, which will destroy itself inside `SrsConfig` destructor. --------- Co-authored-by: winlin <winlinvip@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
related to #1222 (comment)
Above comments said
http_hook
env may not works as expected, as I found there are still has some issue inhttp_hooks
env configuration, but this PR may not target above problem.