FieryChocobo
Right, after a few Months I now have some time off so I was kinda thinking about finishing this project, but I still have this issue, so I am bumping this thread. Doing a bit more research it seems that Derpibooru does reply with a CORS Header but maybe not always. If I test “https://derpicdn.net/” then I get a CORS header, but checking an actual Image I don’t. This might totally be because that’s not how that works in the first place, but the point stands that I still get an Error when trying to request an Image.
My only other idea for why this would be is that none of the Headers in the “Access-Control-Allow-Headers” part match the ones listed on the Unity Site but I don’t exactly know in depth what I am talking about so I might be making a super rookie Mistake.
I construct the URL for the Image using the “image” URl from the JSON Query with “https://” added at the front, so ie:
“https://derpicdn.net/img/view/2012/1/2/0__artist+needed_safe_derpy+hooves_adventure+in+the+comments_bag_building_chair_cigar_derpibooru+legacy_eyes_featured+image_female_grin_gritted+teeth_h.jpg”
The error I get in my JavaScript Console is:
Access to XMLHttpRequest at ‘https://derpicdn.net/img/view/2012/1/2/0__artist+needed_safe_derpy+hooves_adventure+in+the+comments_bag_building_chair_cigar_derpibooru+legacy_eyes_featured+image_female_grin_gritted+teeth_h.jpg’ from origin ‘http://localhost:52975’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Considering I can see “access-control-allow-origin *” on the test I am not sure what’s wrong here.
I tried uploading it to itch.io and testing there and I get the same error.
My only other idea for why this would be is that none of the Headers in the “Access-Control-Allow-Headers” part match the ones listed on the Unity Site but I don’t exactly know in depth what I am talking about so I might be making a super rookie Mistake.
I construct the URL for the Image using the “image” URl from the JSON Query with “https://” added at the front, so ie:
“https://derpicdn.net/img/view/2012/1/2/0__artist+needed_safe_derpy+hooves_adventure+in+the+comments_bag_building_chair_cigar_derpibooru+legacy_eyes_featured+image_female_grin_gritted+teeth_h.jpg”
The error I get in my JavaScript Console is:
Access to XMLHttpRequest at ‘https://derpicdn.net/img/view/2012/1/2/0__artist+needed_safe_derpy+hooves_adventure+in+the+comments_bag_building_chair_cigar_derpibooru+legacy_eyes_featured+image_female_grin_gritted+teeth_h.jpg’ from origin ‘http://localhost:52975’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Considering I can see “access-control-allow-origin *” on the test I am not sure what’s wrong here.
I tried uploading it to itch.io and testing there and I get the same error.