Help w/ Flask

How to get request url using Flask?
eg:
If the request is sent by a url block in snap.html (no open projects),that function should return
https://snap.berkeley.edu/snap/snap.html
Oh,Flask is a python module that runs a server.

I don't think its possible on a repl server - all the methods I've tried just give their server or a google cloud ip.

Non-Snap! questions like this should really be asked on somewhere like stackoverflow.com

You need to get the Origin header in the request headers:

from flask import Flask, request
@app.route('/')
def index():
  return "Requested from " + request.headers.get('Origin') or ''
app.run(8080)

Nope,it just returns the origin not the entire url

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.