-
Notifications
You must be signed in to change notification settings - Fork 156
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
Add trusted origins feature #117
Conversation
Instead of accepting []*url.URL, which can cause weird problems, now TrustedOrigins accept []string, which is the list of hosts accepted by the middleware...So the schema doesn't matter anymore and it's more friendly to use.
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.
Need to flesh out the docs a little more.
Fixed. Thanks for the feedback. :) What do you think? |
Hey. Sorry for bothering but...do you have any additional feedback, @elithrar? :) Thanks. |
Nothing yet! I’m traveling until Friday & won’t have time for a proper
review until the weekend.
…On Wed, Jul 17, 2019 at 11:59 AM Fernando Jorge Mota < ***@***.***> wrote:
Hey.
Sorry for bothering but...do you have any additional feedback, @elithrar
<https://github.com/elithrar>? :)
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#117?email_source=notifications&email_token=AAAEQ4HARJQO3PRI6KANQ7DP75FVBA5CNFSM4IDTWDJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2FC4GY#issuecomment-512372251>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAEQ4BERFSXDNNISIDV6DTP75FVBANCNFSM4IDTWDJQ>
.
|
Oh. Ok! I'll wait and continue to using my fork with this patch on my project, meanwhile. Have a nice trip. :) |
Thanks for bearing with me & resolving the outstanding comments - merged! |
Nice, thank you for accepting the PR! Good luck with the project and keep the nice work. ;) |
Closes #116
I added tests and I accept feedbacks on the API.
I throught about accepting a.[]string
on the added option but we would need to return an error in the case of a URL being invalid, for exampleEDIT: Now the API is more Django-like, accepting
[]string
as a list of trusted hosts to check.