Merge pull request #14 from Baidaidai-GFWD-origin/main

bypass CROS
This commit is contained in:
苏晓晴 2025-03-29 09:12:06 +08:00 committed by GitHub
commit ccae60b7d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,6 +123,12 @@ def lyric_v1(id, cookies):
# Flask 应用部分
app = Flask(__name__)
@app.after_request
def after_request(response):
response.headers.add('Access-Control-Allow-Origin', '*')
response.headers.add('Access-Control-Allow-Headers', 'Content-Type,Authorization')
response.headers.add('Access-Control-Allow-Methods', 'GET,POST,OPTIONS')
return response
@app.route('/', methods=['GET', 'POST'])
def index():