mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
fix: [UI-Showpaste] show raw paste, force text/plain mimetype
This commit is contained in:
parent
d7545a46f0
commit
54cc4f3723
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@
|
||||||
import redis
|
import redis
|
||||||
import json
|
import json
|
||||||
import flask
|
import flask
|
||||||
from flask import Flask, render_template, jsonify, request, Blueprint, make_response
|
from flask import Flask, render_template, jsonify, request, Blueprint, make_response, Response
|
||||||
import difflib
|
import difflib
|
||||||
import ssdeep
|
import ssdeep
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ def showsavedrawpaste():
|
||||||
requested_path = request.args.get('paste', '')
|
requested_path = request.args.get('paste', '')
|
||||||
paste = Paste.Paste(requested_path)
|
paste = Paste.Paste(requested_path)
|
||||||
content = paste.get_p_content()
|
content = paste.get_p_content()
|
||||||
return content, 200, {'Content-Type': 'text/plain'}
|
return Response(content, mimetype='text/plain')
|
||||||
|
|
||||||
@showsavedpastes.route("/showpreviewpaste/")
|
@showsavedpastes.route("/showpreviewpaste/")
|
||||||
def showpreviewpaste():
|
def showpreviewpaste():
|
||||||
|
|
Loading…
Reference in a new issue