Skip to content

Commit

Permalink
added cors to manifest route
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardKoschicek committed Sep 25, 2023
1 parent e58ce66 commit b45d08a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openatlas/views/file.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import json
import os
import subprocess
from pathlib import Path
Expand All @@ -6,6 +7,7 @@
import requests
from flask import g, render_template, request, send_from_directory, url_for
from flask_babel import lazy_gettext as _
from flask_cors import cross_origin
from werkzeug.utils import redirect
from werkzeug.wrappers import Response

Expand Down Expand Up @@ -162,8 +164,9 @@ def getManifest(id_):


@app.route('/iiif_manifest/<int:id_>.json')
@cross_origin()
def iiif_manifest(id_: int):
return getManifest(id_)
return json.dumps(getManifest(id_))


@app.route('/iiif/<int:id_>', methods=['GET'])
Expand Down

0 comments on commit b45d08a

Please sign in to comment.