I am trying to write a compliant flask service.
I fail many test's were my understanding is I should not.
As I debug through chrome this what I get when asking for info.json:
HTTP/1.1 200 OK
Server: Werkzeug/2.2.3 Python/3.11.5
Date: Mon, 11 Mar 2024 12:07:05 GMT
Content-Type: application/ld+json
Content-Length: 298
Access-Control-Allow-Origin: *
Connection: close
And this is what I get when asking for the actual image:
HTTP/1.1 200 OK
Server: Werkzeug/2.2.3 Python/3.11.5
Date: Mon, 11 Mar 2024 12:17:26 GMT
Content-Type: image/jpeg
Content-Length: 870044
Cache-Control: no-cache
Date: Mon, 11 Mar 2024 12:17:26 GMT
Access-Control-Allow-Origin: *
Connection: close
Yet the testcase on the cli gives me:
test cors FAIL
url: ['http://localhost:4000/iiif/caf5f770c38679680655f538ae3b3438/info.json']
got: http://iiif.io/
expected: *
type: CORS
message:
Is Warning?: False
The URL http://iiif.io/ does not exist anywhere in my code.
And is only contained as a super string for the info.json generating dictionary:
tecnical_properties = {
"@context": "http://iiif.io/api/image/3/context.json",
"id":img_url,
"type": "ImageService3",
"protocol": "http://iiif.io/api/image",
"profile": "level2",
"width": image.size[0],
"height": image.size[1],
"maxWidth": global_max_width,
"maxHeight": global_max_height,
"maxArea": global_max_width * global_max_height, # FOR NOW THIS HAS TO BE THE PRODUCT OF maxWidth and maxHeight
}
I am running on localhost although I think this should not mater.
I am trying to write a compliant flask service. I fail many test's were my understanding is I should not.
As I debug through chrome this what I get when asking for info.json:
And this is what I get when asking for the actual image:
Yet the testcase on the cli gives me:
The URL http://iiif.io/ does not exist anywhere in my code. And is only contained as a super string for the info.json generating dictionary:
I am running on localhost although I think this should not mater.