-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Description
Hi there,
I encountered a situation with IPv6 localhost addresses and wanted to clarify whether Flask-CORS officially supports them.
Setup:
Flask backend running on port 5001.
Flask-CORS configuration:
from flask import Flask
from flask_cors import CORS
app = Flask(__name__)
CORS(app, origins=["http://[::1]:8000"]) # IPv6 localhost
@app.route("/origin")
def origin():
return "Hello"
Frontend accessed via: http://[::1]:8000/client.html
Problem:
The browser sends Origin: http://[::1]:8000
Flask-CORS does not seem to add the Access-Control-Allow-Origin header, and the browser blocks the request.
Switching to IPv4 (http://127.0.0.1:8000) works as expected.
Question:
- Is this a known limitation?
- Does Flask-CORS currently fully support IPv6 origins?
Thanks for any clarification or guidance!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels