Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

flask cors

from flask import Flask
from flask_cors import CORS

app = Flask(__name__)
CORS(app, resources={r"*": {"origins": "*"}})
Comment

cors flask

@app.route("/", methods=["GET"])
def get_example():
    """GET in server"""
    response = jsonify(message="Simple server is running")

    # Enable Access-Control-Allow-Origin
    response.headers.add("Access-Control-Allow-Origin", "*")
    return response
Comment

PREVIOUS NEXT
Code Example
Python :: pandas return row 
Python :: python list comprehension 
Python :: multiprocessing print does not work 
Python :: pandas xa0 
Python :: 3d array into 2d array python 
Python :: how to prepare independent and dependent variables from dataframe 
Python :: how to append a dataframe to another dataframe in pandas 
Python :: python last n array elements 
Python :: append object python 
Python :: remove in list python 
Python :: round tuple 
Python :: check if numpy array contains only duplicates 
Python :: Python get all keys from nested dictionary 
Python :: how to send file in python request 
Python :: add tensorflow to conda 
Python :: prevent division by zero numpy 
Python :: how to make my discord bot shut down with a command 
Python :: how to get any letter of a string python 
Python :: python zip() 
Python :: upload to test pypi 
Python :: cv2 get framerete video 
Python :: train slipt sklearn 
Python :: Make Rotation matrix in Python 
Python :: python readlines end of file 
Python :: c++ call python function 
Python :: double in python 
Python :: find charechtar index in string python 
Python :: combine df columns python 
Python :: python random walk 
Python :: discord py message link 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =