1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

Allow CORS for a fw instance

This commit is contained in:
Steffo 2020-01-11 03:27:21 +01:00
parent 0aff0e0090
commit fe5b8a7712

View file

@ -15,4 +15,6 @@ class ApiDiscordPlayStar(PageStar):
except (ValueError, TypeError): except (ValueError, TypeError):
guild_id = None guild_id = None
response = await self.interface.call_herald_event("discord", "discord_play", url=url, guild_id=guild_id) response = await self.interface.call_herald_event("discord", "discord_play", url=url, guild_id=guild_id)
return JSONResponse(response) return JSONResponse(response, headers={
"Access-Control-Allow-Origin": self.interface.config['Funkwhale']['instance_url'],
})