-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cors settings #103
base: main
Are you sure you want to change the base?
Add cors settings #103
Changes from 1 commit
beb11b0
50c06ea
2acb8c2
0813fa5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -340,9 +340,11 @@ jhipster: | |||||
token-validity-in-seconds-for-remember-me: 2592000 # Token is valid 30 days | ||||||
{% endif %} | ||||||
|
||||||
{% if artemis_CORS_allowed_origins is defined and artemis_CORS_allowed_origins is not none %} | ||||||
cors: | ||||||
allowed-origins: {{ artemis_CORS_allowed_origins }} | ||||||
{% if artemis_cors is defined and artemis_cors is not none %} | ||||||
artemis_cors: | ||||||
{% for key, value in cors.items() %} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This probably should be artemis_cors instead of cors
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also why do you iterate through the dict and then convert each entry to yaml instead of just converting the entire dict directly to yaml? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another question: I see the point of not hard coding the keys and having the option of the dynamic configuration, but in the Therefore, I would prefer an homogeneous approach and that the keys are hard coded here as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, I reiterated over that because I need a similar approach for something else (Theia configuration). Thus, I came up with a potential approach for a dynamic configuration in the environment file. |
||||||
{{ key }}: {{ value | to_nice_yaml(indent=2) | trim }} | ||||||
{% endfor %} | ||||||
{% endif %} | ||||||
|
||||||
{% if is_multinode_install|bool == true and artemis_jhipster_registry_password is not none %} | ||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -234,8 +234,13 @@ JHIPSTER_SECURITY_AUTHENTICATION_JWT_BASE64SECRET='{{ artemis_jhipster_jwt }}' | |||||||||||||||||||
JHIPSTER_SECURITY_AUTHENTICATION_JWT_TOKENVALIDITYINSECONDS='259200' | ||||||||||||||||||||
JHIPSTER_SECURITY_AUTHENTICATION_JWT_TOKENVALIDITYINSECONDSFORREMEMBERME='2592000' | ||||||||||||||||||||
{% endif %} | ||||||||||||||||||||
{% if artemis_CORS_allowed_origins is defined and artemis_CORS_allowed_origins is not none %} | ||||||||||||||||||||
JHIPSTER_CORS_ALLOWEDORIGINS='{{ artemis_CORS_allowed_origins }}' | ||||||||||||||||||||
{% if artemis_cors is defined and artemis_cors is not none %} | ||||||||||||||||||||
JHIPSTER_CORS_ALLOWEDMETHODS='{{ artemis_cors.allowed_methods | join(',') }}' | ||||||||||||||||||||
JHIPSTER_CORS_ALLOWEDHEADERS='{{ artemis_cors.allowed_headers | join(',') }}' | ||||||||||||||||||||
JHIPSTER_CORS_EXPOSEDHEADERS='{{ artemis_cors.exposed_headers }}' | ||||||||||||||||||||
JHIPSTER_CORS_ALLOWCREDENTIALS='{{ artemis_cors.allow_credentials }}' | ||||||||||||||||||||
JHIPSTER_CORS_MAXAGE='{{ artemis_cors.max_age }}' | ||||||||||||||||||||
JHIPSTER_CORS_ALLOWEDORIGINS='{{ artemis_cors.allowed_origins | join(',') }}' | ||||||||||||||||||||
Comment on lines
+252
to
+257
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||
{% endif %} | ||||||||||||||||||||
{% if is_multinode_install|bool == true and artemis_jhipster_registry_password is not none %} | ||||||||||||||||||||
JHIPSTER_REGISTRY_PASSWORD='{{ artemis_jhipster_registry_password }}' | ||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it makes sense to have this as a default if theia is defined?