[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does #:with-auth support redirection?

From: Mortimer Cladwell
Subject: Re: Does #:with-auth support redirection?
Date: Fri, 13 Aug 2021 15:41:35 -0400

Thanks Nala!
Doesn't seem to work for me though.
If I redirect using #:with-auth (current-myhost), looks like the URL is duplicated - I am redirected to (on AWS):

On localhost redirected to

On Thu, Aug 12, 2021 at 2:09 PM Nala Ginrut <> wrote:

Basically, this issue is not requesting the URI support in
redirect-to. Although this issue can be naively fixed by adding URI support
to #:with-auth.

The redirect-to doesn't simply add host.addr to the URI, it will detect first, if it exists then use it, if not, use host.addr.
So if you have set, it should use it.

Unfortunately, there's a bug in (current-myhost) to return wrong result
that ingored the correct real host.
This was fixed just now:

BTW, you don't have to use (get-conf '(host name)), the standard way should be (current-myhost).
I've exported this proc in the same commit.

Best regards.

Mortimer Cladwell writes:

> Hi,
> I am running artanis on an AWS EC2 instance (NO Docker) with the following
> entries in artanis.conf:
> =
> host.addr =
> My login page is at   (Note: fake IP to
> protect the innocent)
> I have a method for redirection that supplies a URI:
> (define (get-redirect-uri dest)
>    (string->uri (string-append "http://" (get-conf '(host name)) ":3000/"
> (string-trim dest #\/))))
>  An example of successful use of redirection:
>    (redirect-to rc (get-redirect-uri (string-append "plateset/getps?id="
>  prjid)))
>  In general the redirection works fine except for #:with-auth, which
> requires a string (not URI) and #:with-auth simply appends to "host.addr"
> which is not correct for EC2 (and Docker I predict)
>    #:with-auth #t redirects to
>   Are there other options/strategies for redirection with #:with-auth?
>   Thanks
>   Mortimer

GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058

reply via email to

[Prev in Thread] Current Thread [Next in Thread]