Skip to content

migrating from charon 3 to 4 #119

Open
@Annemarie-dw

Description

@Annemarie-dw

Hi all,

I'm working on a Spring Boot project that uses charon 3.x which is configured through application.properties,
Took a stab at migrating but cannot get the proxy forwarding working.

Doing a basic test of forwarding the url
http://localhost:8090/search?q=hello

to
https://google.com/
I receive the google 404 page.

Log output:
2021-05-28 08:00:08.543 INFO 24456 --- [nio-8090-exec-2] c.g.m.c.f.i.log.ForwardingLogger : Forwarding: GET http://localhost:8090/search?q=hello -> 'test mapping' -> GET https://google.com/search?q=hello 404

I think I'm misunderstanding some fundamental setup.
I'm not familiar with Spring Boot either so there is a whole lot of unknowns for me :)

My setup:

build.gradle:
dependencies {
	compile (group: 'com.github.mkopylec', name: 'charon-spring-webmvc', version: '4.9.0');
	implementation 'org.springframework.boot:spring-boot-starter-jersey'
	implementation 'org.springframework.boot:spring-boot-starter-web'
	providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
}

Charon:

@Configuration
class CharonConfiguration {

    @Bean
    public CharonConfigurer charonConfigurer() {

        CharonConfigurer configurer = charonConfiguration()
                .add( requestMapping( "test mapping" )
                                .set( requestServerNameRewriter().outgoingServers( "https://google.com" ) )
                );
        return configurer;

    }
}

Any ideas where I'm going off the rails?

Kind regards
Anna

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions