Skip to content

Commit

Permalink
10584 fix tutorials (#10606)
Browse files Browse the repository at this point in the history
* setup redirect to tutorials page

* add a default route for SPA traffic

* tutorials route is handled by frontend now

* remove unused var
  • Loading branch information
uklineale authored Feb 8, 2024
1 parent d96653d commit 326823b
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions src/main/java/org/cbioportal/WebAppConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,10 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) {
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addRedirectViewController("/api", swaggerRedirectUrl);

// Redirects for single page app
registry.addViewController("/results/*").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/results**").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/patient/*").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/patient**").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/study/*").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/study").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/mutation_mapper/*").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/mutation_mapper").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/index.do/*").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/case.do/*").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/loading/*").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/comparison").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/comparison/*").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/restore").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/index.do**").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/oncoprinter**").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/encodedRedirect").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/datasets**").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addViewController("/ln**").setViewName(SINGLE_PAGE_APP_ROOT);
registry.addRedirectViewController("/installations", "https://installationmap.netlify.app/");

// Redirects anything that doesn't start with /api or /proxy to the Javascript frontend
registry.addViewController("/{path:^(?!api|proxy$).*$}").setViewName(SINGLE_PAGE_APP_ROOT);
}

@Bean
Expand Down

0 comments on commit 326823b

Please sign in to comment.