question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CORSConfig is not representable as YAML

See original GitHub issue

As seen during #4525 development, CORSConfig cannot be represented as YAML because we’d need the quarkus.http.cors key to be both the key of a key/value pair and the key of a dictionary, which is not possible.

A properties-based CORS filter configuration currently looks like this:

quarkus.http.cors=true
quarkus.http.cors.origins=http://foo.com,http://www.bar.io
quarkus.http.cors.methods=GET,PUT,POST
quarkus.http.cors.headers=X-Custom
quarkus.http.cors.exposed-headers=Content-Disposition
quarkus.http.cors.access-control-max-age=24H

We only need to change the quarkus.http.cors=true property to quarkus.http.cors.enabled=true to make it convertible to YAML.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:25 (24 by maintainers)

github_iconTop GitHub Comments

2reactions
gwennegcommented, Oct 17, 2019

Here’s the complete list of config keys that are currently not representable as YAML, based on the ALL CONFIGURATION OPTIONS doc page (I’m glad it existed to do this check!):

quarkus.hibernate-orm.database.generation
quarkus.hibernate-orm.database.generation.halt-on-error

^ quarkus.hibernate-orm.database.generation could be replaced with quarkus.hibernate-orm.database.generation.auto to match the original Hibernate property. @gsmet WDYT?

quarkus.hibernate-orm.dialect
quarkus.hibernate-orm.dialect.storage-engine

^ quarkus.hibernate-orm.dialect could be replaced with quarkus.hibernate-orm.dialect.name but it differs from the original Hibernate property. @gsmet WDYT?

quarkus.http.cors
quarkus.http.cors.origins
quarkus.http.cors.methods
quarkus.http.cors.headers
quarkus.http.cors.exposed-headers
quarkus.http.cors.access-control-max-age

^ quarkus.http.cors will become quarkus.http.cors.enabled

quarkus.log.console.async
quarkus.log.console.async.overflow
quarkus.log.console.async.queue-length

^ quarkus.log.console.async could be replaced with quarkus.log.console.async.enabled

quarkus.log.file.async
quarkus.log.file.async.overflow
quarkus.log.file.async.queue-length

^ quarkus.log.file.async could be replaced with quarkus.log.file.async.enabled

quarkus.log.syslog.async
quarkus.log.syslog.async.overflow
quarkus.log.syslog.async.queue-length

^ quarkus.log.syslog.async could be replaced with quarkus.log.syslog.async.enabled

I also noticed several configuration keys being used by quarkus-agroal, quarkus-reactive-mysql-client and quarkus-reactive-pg-client. I’m not sure that’s an issue though, but I’d like your opinion about it:

quarkus.datasource.max-size
quarkus.datasource.password
quarkus.datasource.url
quarkus.datasource.username

I’ll see if that kind of issue can be detected at build time, but I’m not sure it’ll be easy. Half of these cases were related to the use of @ConfigItem(name = ConfigItem.PARENT) and the other half was the consequence of hardcoded config keys names using @ConfigItem(name = "foo").

1reaction
gwennegcommented, Oct 18, 2019

I like the idea. I guess this would have to be done in the YamlConfigSource that is currently being donated from micrprofile-extensions to smallrye-config, as discussed in #4525.

I’ll give empty YAML keys a try with #4525 as it is currently using the same YAML parser (snakeyaml) than the future smallrye-config version. It might already support empty keys.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SpringBoot @ConfigurationProperties issue with key that ...
I think this is the normal behaviour. There is a section in the documentation explaining how to keep the escaped characters ( /...
Read more >
AWS::CloudFront::ResponseHeadersPolicy CorsConfig
A Boolean that determines whether CloudFront overrides HTTP response headers received from the origin with the ones specified in this response headers policy....
Read more >
Spring Cloud Hoxton configuration properties
Name Default Description aws.paramstore.default‑context application aws.paramstore.enabled true Is AWS Parameter Store support enabled. aws.paramstore.profile‑separator _
Read more >
Configuring CORS with Spring Boot and Spring Security
In short, the CORS configuration depends on multiple factors: Spring Web / Spring Webflux; Local / Global CORS config; Spring Security or not....
Read more >
PrizmDoc v12.3 - Updated June 23, 2017 - Accusoft Support
converter will not only automatically recognize the form fields, but will also identify the ... Program signed by an authorized representative of Accusoft....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found