Hi there I tried to deploy the kotless shortner ex...
# kotless
h
Hi there I tried to deploy the kotless shortner example, but the CSS and JS are giving 403 Forbidden errors (this is slightly different from the above question, which was spring and 404). I also commented out the route53 stanza. I’ve tried a few different things, in terms of access on the bucket, using a new bucket with open permissions, etc, but nothing has worked so far. It makes testing things hard since the JS for the button doesn’t work…
I get 403 when using curl to fetch the resources directly from S3, as well.
Going to the
static/
folder in the bucket and making it public allows me to use curl to fetch objects directly, but still get 403s on the generated resources.
I’ve been able to work around for now by doubling up the
script
and
link
blocks and just pasting in the S3 http paths.
hmm unfortunately I also get a 403 on the
/shorten?value=<http://example.com|example.com>
GET request
Actually it looks like it is the same issue as Gary’s from Feb 11; however I am using the kotless DSL. It does look like an issue with the missing
/STAGE/
part of the path
t
Does it work from Chrome?)
h
Just tried it, no. But I think the issue is the missing
/1
at the start of the path of the links. (Don’t see how browser would effect that).
t
Yeah, curl may not pass user-agent that could affect results 😞
Hm, it is strange, I'll check why it is not working
Kotless DSL should add stage to path by default
h
But the path for the button is hardcoded in the
shortener.js
file, line 20:
Copy code
http.open('GET', url("/shorten", {value: input.value}), true);
I can work around this by using the
toAbsoluteHref
function on the appropriate strings and changing the path in the
shortener.js
file. Not ideal, but allows me to make progress on my actual task 😄
Arrg just noticed that the
shorten
function has hard-coded
"<https://short.kotless.io>"
rather than using request context
t
Aaaaaa, ok, I see. Yeah, it may be that shortener itself is not really prepared to be deployed without access to DNS
Yeah, the real fix is just to update js