-
Notifications
You must be signed in to change notification settings - Fork 135
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
feature: custom domains using Fairings #596
Open
igalic
wants to merge
48
commits into
Plume-org:main
Choose a base branch
from
igalic:feat/custom-fairing-domains
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
6bcc4f0
add custom_domain (default to NULL) to schema
igalic 92bbeeb
add Host(String) wrapper type
igalic 65ae51b
implement Host more completely by doing less
igalic 351c01f
list custom_domains
igalic 3a4c2f2
create & attach an AdHoc Fairing for dealing with Custom Domains
igalic 2746e08
appease clippy
igalic e6747de
cache custom_domains list
igalic b09b51c
normalize URLs before setting them
igalic f94b0c7
move impl closer to mother struct
igalic 0645f7e
CustomDomainFairing must not match /static/ and /api/
igalic 468e663
Add custom_details and custom_activity_details as first routes
igalic 1c34ac3
replace if / else with ok_or()
igalic 8e6b1ab
simplify retrieval in find_by_host()
igalic a0aef50
extract common routing code into private "_guts()" functions
igalic 6253adf
simplify / unify error handling
igalic 92fbd17
extend 404 handler to handle all the requests our custom_ routes dont
igalic 8e7f789
Allow searching from custom_domain
igalic 9cee38a
add url to Blog, this seems useful.
igalic cc0df4e
redirect blog urls to custom_domain if it exists
igalic fe110b5
fix issues pointed out by @BaptisteGelez in review
igalic f73fba5
custom_domainify posts::details
igalic 203da23
follow up on @fdb-hiroshima & @BaptisteGelez review
igalic 7139119
add url! macro for custom domain path uri creation
trinity-1686a f635dcf
move custom_ route functions into a custom namespace
igalic cdc919e
allow more syntaxes for url
trinity-1686a 6cd8bd8
fix syntax: we're now down to type errors
igalic c5f6b88
make url! work better
trinity-1686a b172a80
finally fix url!
trinity-1686a 2dedcdb
start modifying /blogs/new to add custom_domain to the form
igalic fdc7da0
Strings have to be cloned
elegaanz 6027012
fix clippy warning
igalic da6757c
Basic domain validation
elegaanz ff0c82e
review by @fdb-hiroshima
igalic bf1673d
start exploring some ideas for domain validation
igalic ed30284
implement domain validation using rocket::State
igalic 444a467
correctly mutex-lock and modify valid_domains
igalic 6072351
one step closer to validating custom domains!
igalic 5e46922
validate custom domain!
igalic 38ece9b
do not panic if reqwest does not work
igalic f67ce93
fix getter router for domain_validation!
igalic df47cdd
also mount domain_validation into /custom_domains/
igalic 064dd79
Allow editing blogs with custom_domain
igalic 1694698
use Custom status code
igalic 768f126
use Status::* as @fdb-hiroshima suggested
igalic df7adaf
when building links, skip both, /custom_domain/ and <custom_domain>
igalic f395c10
fix mount point for blog post routing function
igalic d242e6d
restore df7adaf0e067802daf3e83935cf9140fb15ca17b ← after fixing mount…
igalic 3c4abcf
Allow updating of custom_domain
igalic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a quite personal opinion, but I think
blog.custom_domain.map(ToString::to_string).unwrap_or_default()
is more explicit (but, yes, it is only my opinion, maybe it is not).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another question might be: why were you able to use
Option<String>
fortheme
inEditForm
but i have to useString
here?