dongsiqie commited on
Commit
ebfd5ce
1 Parent(s): 8fb7a9e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from flask import Flask, redirect
2
 
3
  app = Flask(__name__)
4
 
@@ -8,7 +8,11 @@ def index():
8
 
9
  @app.route('/<path:path>', methods=['GET', 'POST'])
10
  def redirect_all(path):
 
 
 
 
11
  return redirect('https://dongsiqie.me', code=302)
12
 
13
  if __name__ == '__main__':
14
- app.run()
 
1
+ from flask import Flask, redirect, abort, request
2
 
3
  app = Flask(__name__)
4
 
 
8
 
9
  @app.route('/<path:path>', methods=['GET', 'POST'])
10
  def redirect_all(path):
11
+ if 'create' in path or 'fd' in path or 'web' in path:
12
+ return redirect('http://127.0.0.1', code=301)
13
+ if request.method == 'POST':
14
+ return redirect('http://127.0.0.1', code=301)
15
  return redirect('https://dongsiqie.me', code=302)
16
 
17
  if __name__ == '__main__':
18
+ app.run()