1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-08-02 02:35:04 +00:00

Merge branch 'master' into websocket_close_reason

This commit is contained in:
Nathan Fox 2018-04-21 17:05:43 -04:00
commit 507361c1df

View file

@ -150,8 +150,8 @@ impl CsrfFilter {
/// Add an origin that is allowed to make requests. Will be verified
/// against the `Origin` request header.
pub fn allowed_origin(mut self, origin: &str) -> CsrfFilter {
self.origins.insert(origin.to_owned());
pub fn allowed_origin<T: Into<String>>(mut self, origin: T) -> CsrfFilter {
self.origins.insert(origin.into());
self
}