Skip to content

URL Mappings don't check for excludes #10203

@rpalcolea

Description

@rpalcolea

Steps to Reproduce

  1. Execute the app
  2. Open in your browser http://localhost:8080/stomp/info

Expected Behaviour

Should hit stomp and return a JSON as follows:

{"entropy":-540329649,"origins":["*:*"],"cookie_needed":true,"websocket":true}

Actual Behaviour

It's hitting the UrlMapping '/**'(controller:"index") instead of hitting the spring websockets endpoints.

I took a look at https://github.com/grails/grails-core/blob/639d7039d24031dbc1353f95b6d2c88a100da850/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/UrlMappingsHolderFactoryBean.java#L101 and I'm able to see the excludedPatterns array while debugging.

I was expecting the URLMappings to exclude ["/stomp/", "/stomp/*", "/topic/*"]

This worked on Grails 2.5.x

Environment Information

  • Operating System: OSX 10.11.2 (El Capitan)
  • Grails Version: 3.2.0 (it happens on 3.1.11 too)
  • JDK Version: 1.8.0_101
  • Container Version (If Applicable): Tomcat 8 (embedded one)

Example Application

Please take a look in https://github.com/rpalcolea/url-mappings-exclude/blob/master/grails-app/controllers/url/mappings/exclude/UrlMappings.groovy

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions