mitre / mitre/HTTP-Proxy-Servlet

proxy configuration

Open
#90 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Java
Stars
1.5k
Forks
557
PR merge metrics
No merged PRs in 30d

Description

Hi,
I want to config proxy for url like this http://server:port/xxx/yyy/zzz?ppp=123
xxx, yyy, zzz - all these variables are different in many urls for example

http://server:port/xxx1/y1yy/z2zz
http://server:port/test/yes/no
http://server:port/t1/y1/no

So I do forward for the url
forward:/my_name/xxx1/y1yy/z2zz
and get this log
INFO: /my_name/**: proxy GET uri: /appName/my_name -- http://server:port/?xxx1/y1yy/z2zz
but the right url must to be :
http://server:port/xxx1/y1yy/z2zz
I am trying to config the proxy like this but no lack :

<bean name="/my_name/**" class="xxx.ServletWrappingControllerExt">
        <property name="pathToStrip" value="/"/>
        <property name="servletClass" value="org.mitre.dsmiley.httpproxy.ProxyServlet"/>
        <property name="servletName" value="/"/>
        <property name="initParameters">
            <props>
                <prop key="targetUri">http://server:port</prop>
                <prop key="log">true</prop>
            </props>
        </property>
    </bean>

Can you suggest me how to do it ?
Thank you !

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The reported behavior involves org.mitre.dsmiley.httpproxy.ProxyServlet with a ServletWrappingControllerExt bean and the targetUri and pathToStrip init parameters. Start by tracing how the /my_name/** mapping joins the incoming path to targetUri, then reproduce the logged request. Done means forwarding preserves /xxx1/y1yy/z2zz without the unexpected query-style separator.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.