(cls, origin, allowed_origins, host)
| 34 | |
| 35 | @classmethod |
| 36 | def check_origin(cls, origin, allowed_origins, host): |
| 37 | if cls.is_same_site(origin, host): |
| 38 | return True |
| 39 | |
| 40 | return any( |
| 41 | fnmatch.fnmatch(origin, pattern) |
| 42 | for pattern in allowed_origins |
| 43 | ) |
| 44 | |
| 45 | @staticmethod |
| 46 | def is_same_site(origin, host): |
nothing calls this directly
no test coverage detected