首页 > 解决方案 > 使用嵌入轨道时的 Spotify 错误请求

问题描述

我正在使用烧瓶来构建我的网络应用程序。当它尝试加载<iframe>错误时出现。在控制台中,您可以看到以下错误:Failed to load resource: the server responded with a status of 400 (). 我的请求 URL 看起来像这样:https://open.spotify.com/embed/track/2XU0oxnq2qxCpomAAuJY8K并且从我的后端解析到我的前端。我的前端看起来像这样:

<iframe src={{url}}" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>

令人困惑的是,当我手动将 url 粘贴到它时,<iframe>它工作正常。

标签: pythonflaskspotify

解决方案


推荐阅读