mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 07:17:17 +00:00
type: update for new cors release
This commit is contained in:
parent
8a4e900ab9
commit
d283dccc1e
@ -17,7 +17,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
import aiohttp_cors # type: ignore[import-untyped]
|
import aiohttp_cors
|
||||||
|
|
||||||
from aiohttp.web import Application
|
from aiohttp.web import Application
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ def setup_cors(application: Application) -> aiohttp_cors.CorsConfig:
|
|||||||
aiohttp_cors.CorsConfig: generated CORS configuration
|
aiohttp_cors.CorsConfig: generated CORS configuration
|
||||||
"""
|
"""
|
||||||
cors = aiohttp_cors.setup(application, defaults={
|
cors = aiohttp_cors.setup(application, defaults={
|
||||||
"*": aiohttp_cors.ResourceOptions(
|
"*": aiohttp_cors.ResourceOptions( # type: ignore[no-untyped-call]
|
||||||
expose_headers="*",
|
expose_headers="*",
|
||||||
allow_headers="*",
|
allow_headers="*",
|
||||||
allow_methods="*",
|
allow_methods="*",
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
from aiohttp.web import HTTPBadRequest, HTTPNotFound, Request, StreamResponse, View
|
from aiohttp.web import HTTPBadRequest, HTTPNotFound, Request, StreamResponse, View
|
||||||
from aiohttp_cors import CorsViewMixin # type: ignore[import-untyped]
|
from aiohttp_cors import CorsViewMixin
|
||||||
from collections.abc import Awaitable, Callable
|
from collections.abc import Awaitable, Callable
|
||||||
from typing import ClassVar, TypeVar
|
from typing import ClassVar, TypeVar
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user