fix(app): keep blueprints when CROW_DISABLE_STATIC_DIR is set (#941) - #1221
Open
soniafergusonship wants to merge 1 commit into
Open
fix(app): keep blueprints when CROW_DISABLE_STATIC_DIR is set (#941)#1221soniafergusonship wants to merge 1 commit into
soniafergusonship wants to merge 1 commit into
Conversation
…p#941) Signed-off-by: soniafergusonship <soniafergusonship@users.noreply.github.com>
Member
|
shoudn't this be added to the initial PR? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
CROW_DISABLE_STATIC_DIRgated bothadd_blueprint()andadd_static_dir(), so blueprint routes were never registered (router_.validate_bp()never ran).This moves blueprint validation into
Crow::validate()so blueprints stay active when the static-directory define is set. Global/blueprint static file routes remain behindCROW_DISABLE_STATIC_DIR.Test plan
CROW_DISABLE_STATIC_DIRand runexamples/example_blueprint.cpp— blueprint routes respondapp.debug_print()shows blueprint routes when the define is set/static/behavior is unchangedFixes #941