Skip to content

Repsond to Options request with reasonable values.#1289

Merged
MikeNeilson merged 1 commit into
developfrom
bugfix/1175-handle-options
Sep 4, 2025
Merged

Repsond to Options request with reasonable values.#1289
MikeNeilson merged 1 commit into
developfrom
bugfix/1175-handle-options

Conversation

@MikeNeilson
Copy link
Copy Markdown
Contributor

Fixes #1175.

Reported a while ago but saw @dennisgsmith implementing some workarounds (https://github.com/USACE/instrumentation-api/pull/281) which really shouldn't be necessary.

Copy link
Copy Markdown
Collaborator

@krowvin krowvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Pending the path wildcard is actually */ and not **/ or something

ctx.json(errResponse);
})
.routes(this::configureRoutes)
.options("/*", ctx -> {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this wildcards to all paths and sub paths and will also include all path versions when that comes along

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's how it behaved in the tests. Hopefully it stays that way in future versions.

@MikeNeilson MikeNeilson merged commit 6d008de into develop Sep 4, 2025
9 checks passed
@MikeNeilson MikeNeilson deleted the bugfix/1175-handle-options branch September 4, 2025 13:39
@MikeNeilson
Copy link
Copy Markdown
Contributor Author

@dennisgsmith this should be deployed in -dev now if you want to try testing against https://water.dev.cwbi.us/cwms-data/.

MikeNeilson added a commit that referenced this pull request Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ensure OPTIONS request is handled in CDA

2 participants