<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I've seen this problem when trying to get images using
javascript, the answer tends to be add the option no-cors. <br>
I've done it using fetch - don't see that xhttp has the option,
like this:<code style="margin: 0px; padding: 0px; border: 0px;
font-style: inherit; font-variant: inherit; font-weight:
inherit; font-stretch: inherit; line-height: inherit;
font-family: Consolas, Menlo, Monaco, "Lucida
Console", "Liberation Mono", "DejaVu Sans
Mono", "Bitstream Vera Sans Mono", "Courier
New", monospace, sans-serif; font-size: 13px;
vertical-align: baseline; box-sizing: inherit; background-color:
transparent; white-space: inherit;"><span class="pln"
style="margin: 0px; padding: 0px; border: 0px; font-style:
inherit; font-variant: inherit; font-weight: inherit;
font-stretch: inherit; line-height: inherit; font-family:
inherit; font-size: 13px; vertical-align: baseline;
box-sizing: inherit; color: var(--black-750);"><br>
<br>
options </span><span class="pun" style="margin: 0px; padding:
0px; border: 0px; font-style: inherit; font-variant: inherit;
font-weight: inherit; font-stretch: inherit; line-height:
inherit; font-family: inherit; font-size: 13px;
vertical-align: baseline; box-sizing: inherit; color:
var(--black-750);">=</span><span class="pln" style="margin:
0px; padding: 0px; border: 0px; font-style: inherit;
font-variant: inherit; font-weight: inherit; font-stretch:
inherit; line-height: inherit; font-family: inherit;
font-size: 13px; vertical-align: baseline; box-sizing:
inherit; color: var(--black-750);"> </span><span class="pun"
style="margin: 0px; padding: 0px; border: 0px; font-style:
inherit; font-variant: inherit; font-weight: inherit;
font-stretch: inherit; line-height: inherit; font-family:
inherit; font-size: 13px; vertical-align: baseline;
box-sizing: inherit; color: var(--black-750);">{</span><span
class="pln" style="margin: 0px; padding: 0px; border: 0px;
font-style: inherit; font-variant: inherit; font-weight:
inherit; font-stretch: inherit; line-height: inherit;
font-family: inherit; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; color: var(--black-750);"></span></code><code
style="margin: 0px; padding: 0px; border: 0px; font-style:
inherit; font-variant: inherit; font-weight: inherit;
font-stretch: inherit; line-height: inherit; font-family:
Consolas, Menlo, Monaco, "Lucida Console",
"Liberation Mono", "DejaVu Sans Mono",
"Bitstream Vera Sans Mono", "Courier New",
monospace, sans-serif; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; background-color: transparent;
white-space: inherit;"><span class="pln" style="margin: 0px;
padding: 0px; border: 0px; font-style: inherit; font-variant:
inherit; font-weight: inherit; font-stretch: inherit;
line-height: inherit; font-family: inherit; font-size: 13px;
vertical-align: baseline; box-sizing: inherit; color:
var(--black-750);"><br>
method</span><span class="pun" style="margin: 0px;
padding: 0px; border: 0px; font-style: inherit; font-variant:
inherit; font-weight: inherit; font-stretch: inherit;
line-height: inherit; font-family: inherit; font-size: 13px;
vertical-align: baseline; box-sizing: inherit; color:
var(--black-750);">:</span><span class="pln" style="margin:
0px; padding: 0px; border: 0px; font-style: inherit;
font-variant: inherit; font-weight: inherit; font-stretch:
inherit; line-height: inherit; font-family: inherit;
font-size: 13px; vertical-align: baseline; box-sizing:
inherit; color: var(--black-750);"> </span><span class="str"
style="margin: 0px; padding: 0px; border: 0px; font-style:
inherit; font-variant: inherit; font-weight: inherit;
font-stretch: inherit; line-height: inherit; font-family:
inherit; font-size: 13px; vertical-align: baseline;
box-sizing: inherit; color: var(--red-800);">'GET'</span><span
class="pun" style="margin: 0px; padding: 0px; border: 0px;
font-style: inherit; font-variant: inherit; font-weight:
inherit; font-stretch: inherit; line-height: inherit;
font-family: inherit; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; color: var(--black-750);">,</span><span
class="pln" style="margin: 0px; padding: 0px; border: 0px;
font-style: inherit; font-variant: inherit; font-weight:
inherit; font-stretch: inherit; line-height: inherit;
font-family: inherit; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; color: var(--black-750);"></span></code><code
style="margin: 0px; padding: 0px; border: 0px; font-style:
inherit; font-variant: inherit; font-weight: inherit;
font-stretch: inherit; line-height: inherit; font-family:
Consolas, Menlo, Monaco, "Lucida Console",
"Liberation Mono", "DejaVu Sans Mono",
"Bitstream Vera Sans Mono", "Courier New",
monospace, sans-serif; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; background-color: transparent;
white-space: inherit;"><span class="pln" style="margin: 0px;
padding: 0px; border: 0px; font-style: inherit; font-variant:
inherit; font-weight: inherit; font-stretch: inherit;
line-height: inherit; font-family: inherit; font-size: 13px;
vertical-align: baseline; box-sizing: inherit; color:
var(--black-750);"> mode</span><span class="pun"
style="margin: 0px; padding: 0px; border: 0px; font-style:
inherit; font-variant: inherit; font-weight: inherit;
font-stretch: inherit; line-height: inherit; font-family:
inherit; font-size: 13px; vertical-align: baseline;
box-sizing: inherit; color: var(--black-750);">:</span><span
class="pln" style="margin: 0px; padding: 0px; border: 0px;
font-style: inherit; font-variant: inherit; font-weight:
inherit; font-stretch: inherit; line-height: inherit;
font-family: inherit; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; color: var(--black-750);"> </span><span
class="str" style="margin: 0px; padding: 0px; border: 0px;
font-style: inherit; font-variant: inherit; font-weight:
inherit; font-stretch: inherit; line-height: inherit;
font-family: inherit; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; color: var(--red-800);">'no-cors'</span><span
class="pln" style="margin: 0px; padding: 0px; border: 0px;
font-style: inherit; font-variant: inherit; font-weight:
inherit; font-stretch: inherit; line-height: inherit;
font-family: inherit; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; color: var(--black-750);"></span></code><code
style="margin: 0px; padding: 0px; border: 0px; font-style:
inherit; font-variant: inherit; font-weight: inherit;
font-stretch: inherit; line-height: inherit; font-family:
Consolas, Menlo, Monaco, "Lucida Console",
"Liberation Mono", "DejaVu Sans Mono",
"Bitstream Vera Sans Mono", "Courier New",
monospace, sans-serif; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; background-color: transparent;
white-space: inherit;"><span class="pun" style="margin: 0px;
padding: 0px; border: 0px; font-style: inherit; font-variant:
inherit; font-weight: inherit; font-stretch: inherit;
line-height: inherit; font-family: inherit; font-size: 13px;
vertical-align: baseline; box-sizing: inherit; color:
var(--black-750);"> };</span><span class="pln" style="margin:
0px; padding: 0px; border: 0px; font-style: inherit;
font-variant: inherit; font-weight: inherit; font-stretch:
inherit; line-height: inherit; font-family: inherit;
font-size: 13px; vertical-align: baseline; box-sizing:
inherit; color: var(--black-750);"></span></code><code
style="margin: 0px; padding: 0px; border: 0px; font-style:
inherit; font-variant: inherit; font-weight: inherit;
font-stretch: inherit; line-height: inherit; font-family:
Consolas, Menlo, Monaco, "Lucida Console",
"Liberation Mono", "DejaVu Sans Mono",
"Bitstream Vera Sans Mono", "Courier New",
monospace, sans-serif; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; background-color: transparent;
white-space: inherit;"><span class="pln" style="margin: 0px;
padding: 0px; border: 0px; font-style: inherit; font-variant:
inherit; font-weight: inherit; font-stretch: inherit;
line-height: inherit; font-family: inherit; font-size: 13px;
vertical-align: baseline; box-sizing: inherit; color:
var(--black-750);"><br>
<br>
fetch</span><span class="pun" style="margin: 0px; padding:
0px; border: 0px; font-style: inherit; font-variant: inherit;
font-weight: inherit; font-stretch: inherit; line-height:
inherit; font-family: inherit; font-size: 13px;
vertical-align: baseline; box-sizing: inherit; color:
var(--black-750);">(</span><span class="pln" style="margin:
0px; padding: 0px; border: 0px; font-style: inherit;
font-variant: inherit; font-weight: inherit; font-stretch:
inherit; line-height: inherit; font-family: inherit;
font-size: 13px; vertical-align: baseline; box-sizing:
inherit; color: var(--black-750);">url</span><span class="pun"
style="margin: 0px; padding: 0px; border: 0px; font-style:
inherit; font-variant: inherit; font-weight: inherit;
font-stretch: inherit; line-height: inherit; font-family:
inherit; font-size: 13px; vertical-align: baseline;
box-sizing: inherit; color: var(--black-750);">,</span><span
class="pln" style="margin: 0px; padding: 0px; border: 0px;
font-style: inherit; font-variant: inherit; font-weight:
inherit; font-stretch: inherit; line-height: inherit;
font-family: inherit; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; color: var(--black-750);">
options</span><span class="pun" style="margin: 0px; padding:
0px; border: 0px; font-style: inherit; font-variant: inherit;
font-weight: inherit; font-stretch: inherit; line-height:
inherit; font-family: inherit; font-size: 13px;
vertical-align: baseline; box-sizing: inherit; color:
var(--black-750);">).</span><span class="pln" style="margin:
0px; padding: 0px; border: 0px; font-style: inherit;
font-variant: inherit; font-weight: inherit; font-stretch:
inherit; line-height: inherit; font-family: inherit;
font-size: 13px; vertical-align: baseline; box-sizing:
inherit; color: var(--black-750);">then</span><span
class="pun" style="margin: 0px; padding: 0px; border: 0px;
font-style: inherit; font-variant: inherit; font-weight:
inherit; font-stretch: inherit; line-height: inherit;
font-family: inherit; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; color: var(--black-750);">(</span><span
class="pln" style="margin: 0px; padding: 0px; border: 0px;
font-style: inherit; font-variant: inherit; font-weight:
inherit; font-stretch: inherit; line-height: inherit;
font-family: inherit; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; color: var(--black-750);">response
</span><span class="pun" style="margin: 0px; padding: 0px;
border: 0px; font-style: inherit; font-variant: inherit;
font-weight: inherit; font-stretch: inherit; line-height:
inherit; font-family: inherit; font-size: 13px;
vertical-align: baseline; box-sizing: inherit; color:
var(--black-750);">=></span><span class="pln"
style="margin: 0px; padding: 0px; border: 0px; font-style:
inherit; font-variant: inherit; font-weight: inherit;
font-stretch: inherit; line-height: inherit; font-family:
inherit; font-size: 13px; vertical-align: baseline;
box-sizing: inherit; color: var(--black-750);"> response</span><span
class="pun" style="margin: 0px; padding: 0px; border: 0px;
font-style: inherit; font-variant: inherit; font-weight:
inherit; font-stretch: inherit; line-height: inherit;
font-family: inherit; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; color: var(--black-750);">.</span><span
class="pln" style="margin: 0px; padding: 0px; border: 0px;
font-style: inherit; font-variant: inherit; font-weight:
inherit; font-stretch: inherit; line-height: inherit;
font-family: inherit; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; color: var(--black-750);">blob</span><span
class="pun" style="margin: 0px; padding: 0px; border: 0px;
font-style: inherit; font-variant: inherit; font-weight:
inherit; font-stretch: inherit; line-height: inherit;
font-family: inherit; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; color: var(--black-750);">())</span></code><br>
<code style="margin: 0px; padding: 0px; border: 0px; font-style:
inherit; font-variant: inherit; font-weight: inherit;
font-stretch: inherit; line-height: inherit; font-family:
Consolas, Menlo, Monaco, "Lucida Console",
"Liberation Mono", "DejaVu Sans Mono",
"Bitstream Vera Sans Mono", "Courier New",
monospace, sans-serif; font-size: 13px; vertical-align:
baseline; box-sizing: inherit; background-color: transparent;
white-space: inherit;"><span class="pun" style="margin: 0px;
padding: 0px; border: 0px; font-style: inherit; font-variant:
inherit; font-weight: inherit; font-stretch: inherit;
line-height: inherit; font-family: inherit; font-size: 13px;
vertical-align: baseline; box-sizing: inherit; color:
var(--black-750);"></span></code></p>
<pre class="lang-js prettyprint prettyprinted" style="margin: 0px 0px 1em; padding: 12px 8px; border: 0px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-weight: 400; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; width: auto; max-height: 600px; overflow: auto; background-color: var(--black-050); border-radius: 3px; display: block; color: rgb(36, 39, 41); overflow-wrap: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; background-color: transparent; white-space: inherit;"><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 13px; vertical-align: baseline; box-sizing: inherit; color: var(--black-750);"> ......
</span></code></pre>
<p>However since you are saying it's a server you control at AWS
then more specific detail is needed to be more help.<br>
Esp since there are many AWS services, which one is important.<br>
<br>
Here is a more detailed explanation of cors itself, which I'll
guess you've already seen:<br>
<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS">https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS</a><br>
<br>
Rich<br>
</p>
<div class="moz-cite-prefix">On 6/8/2020 10:34 AM, Alan Frank via
Hidden-discuss wrote:<br>
</div>
<blockquote type="cite"
cite="mid:fd34828a640c338ba907df1aa72acc0f@8wheels.org">Hi,
<br>
<br>
I am a newbie with AWS (learning it via acloudguru.com, where I
posted my question a few days ago and have gotten no responses)
and am running into problems with CORS; specifically, I am getting
an error when my JS code attempts to call my API: "Access to
XMLHttpRequest at
'https://<redacted>.execute-api.us-east-1.amazonaws.com/default'
from origin '<a class="moz-txt-link-freetext" href="https://s3.amazonaws.com">https://s3.amazonaws.com</a>' has been blocked by CORS
policy: No 'Access-Control-Allow-Origin' header is present on the
requested resource."
<br>
<br>
There is a huge amount of information out there, but most of it
appears to be either irrelevant or over my head. I did figure out
that I might be able to look at an access log to see what is going
on. I found the instructions on setting this up
(<a class="moz-txt-link-freetext" href="https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html#set-up-access-logging-using-console">https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html#set-up-access-logging-using-console</a>),
but they tell me to "Sign in to the API Gateway console, select an
API, choose Settings from the primary navigation panel, and enter
an ARN in CloudWatch log role ARN." However, this field does not
seem to exist. I have provided this feedback to AWS, but am not
expecting a timely response.
<br>
<br>
I'd be grateful for any help.
<br>
<br>
--Alan
<br>
_______________________________________________
<br>
Hidden-discuss mailing list - home page:
<a class="moz-txt-link-freetext" href="http://www.hidden-tech.net">http://www.hidden-tech.net</a>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Hidden-discuss@lists.hidden-tech.net">Hidden-discuss@lists.hidden-tech.net</a>
<br>
<br>
You are receiving this because you are on the Hidden-Tech
Discussion list.
<br>
If you would like to change your list preferences, Go to the
Members
<br>
page on the Hidden Tech Web site.
<br>
<a class="moz-txt-link-freetext" href="http://www.hidden-tech.net/members">http://www.hidden-tech.net/members</a>
<br>
<br>
</blockquote>
<pre class="moz-signature" cols="72">--
Rich Roth
CEO TnR Global
Bio and personal blog: <a class="moz-txt-link-freetext" href="http://rizbang.com">http://rizbang.com</a>
Building the really big sites: <a class="moz-txt-link-freetext" href="http://www.tnrglobal.com">http://www.tnrglobal.com</a>
Small/Soho business in the PV: <a class="moz-txt-link-freetext" href="http://www.hidden-tech.net">http://www.hidden-tech.net</a>
Places to meet for business: <a class="moz-txt-link-freetext" href="http://www.meetmewhere.com">http://www.meetmewhere.com</a>
And for relaxation: <a class="moz-txt-link-freetext" href="http://www.welovemuseums.com">http://www.welovemuseums.com</a>
<a class="moz-txt-link-freetext" href="http://www.artonmytv.com/">http://www.artonmytv.com/</a>
Helping move the world: <a class="moz-txt-link-freetext" href="http://www.earththrives.com">http://www.earththrives.com</a></pre>
</body>
</html>