[ 
https://issues.apache.org/jira/browse/ARTEMIS-5559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17987223#comment-17987223
 ] 

Justin Bertram edited comment on ARTEMIS-5559 at 7/1/25 1:48 PM:
-----------------------------------------------------------------

Looking at the [Jolokia 
code|https://github.com/jolokia/jolokia/blob/228f09b6a7b4f910e876b983c67658c8c29e9257/server/core/src/main/java/org/jolokia/server/core/http/HttpRequestHandler.java#L293]
 it seems pretty clear that this error is thrown if {{<ignore-scheme/>}} isn't 
set.

I believe the culprit here is _where_ you set {{<ignore-scheme/>}}. Try using 
this instead:
{code:xml}
<restrict>
    <cors>
        <allow-origin>*</allow-origin>
        <!-- Use if Origin header can use https while the protocol is http 
(e.g., with TLS proxy) -->
        <ignore-scheme/>
    </cors>
</restrict>{code}
This is what the [Jolokia 
documentation|https://jolokia.org/reference/html/manual/security.html#_cross_origin_resource_sharing_cors_restrictions]
 demonstrates.


was (Author: jbertram):
Looking at the [Jolokia 
code|https://github.com/jolokia/jolokia/blob/228f09b6a7b4f910e876b983c67658c8c29e9257/server/core/src/main/java/org/jolokia/server/core/http/HttpRequestHandler.java#L293]
 it seems pretty clear that this error is thrown if {{<ignore-scheme/>}} isn't 
set.

I believe the culprit here is _where_ you set {{<ignore-scheme/>}}. Try using 
this instead:
{code:xml}
<restrict>
    <cors>
        <allow-origin>*</allow-origin>
        <!-- Use if Origin header can use https while the protocol is http 
(e.g., with TLS proxy) -->
        <ignore-scheme/>
    </cors>
</restrict>{code}

> Cannot proxy traffic to jolokia when SSL is terminated
> ------------------------------------------------------
>
>                 Key: ARTEMIS-5559
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5559
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Web Console
>            Reporter: Gašper Čefarin
>            Priority: Major
>         Attachments: jolokia_403.png, results2.png
>
>
> A problem appeared when upgrading from 2.37 to 2.41. I strongly suspect it 
> happens when upgrading from jetty 11 to 12.
> This is one of the only visible problems - response from 
> {{https://xxxxxxxxxx/console/jolokia}} (actual http response is 200)
> !jolokia_403.png|width=75%!
> This is how the "console" looks:
> !results2.png|width=75%!
> I was not able to find a solution yet which would work with haproxy.
> Exposing via jetty only works fine.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@activemq.apache.org
For additional commands, e-mail: issues-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to