Skip to content

Commit

Permalink
OP-1232 Improve api security config (#478)
Browse files Browse the repository at this point in the history
* Revised SecurityConfig without deprecated methods

* Allow swagger paths

* Add cors.allowed.origins to .dist file

* Restoring and update latest requestMatchers

* Allow OpenAPI generation plugin

* Add placeholder for host an ui

* Fix indentation and Eclipse formatter

* Fix 401 on GET /hospitals
  • Loading branch information
mwithi authored Oct 30, 2024
1 parent c28bbfa commit ccb06f9
Show file tree
Hide file tree
Showing 5 changed files with 277 additions and 317 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_with_spaces" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
Expand Down Expand Up @@ -200,6 +200,7 @@
<setting id="org.eclipse.jdt.core.formatter.wrap_before_additive_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case_after_arrow" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
Expand Down Expand Up @@ -280,6 +281,7 @@
<setting id="org.eclipse.jdt.core.formatter.alignment_for_relational_operator" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.align_arrows_in_switch_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_additive_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
Expand Down Expand Up @@ -310,6 +312,7 @@
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_line_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_shift_operator" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
Expand Down
3 changes: 3 additions & 0 deletions rsc/application.properties.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ server.servlet.session.cookie.http-only=true
spring.pid.fail-on-write-error=true
spring.pid.file=OH_API_PID

### In production change to http://<domain>
cors.allowed.origins=http://API_HOST:API_PORT,http://UI_HOST:UI_PORT

### Swagger-UI (info)
api.host=API_HOST:API_PORT
api.protocol=http
Expand Down
Loading

0 comments on commit ccb06f9

Please sign in to comment.