Commit Graph

5 Commits

Author SHA1 Message Date
Aurora Lahtela 88b4191f6b
Implement http caching (#2840)
* Implement first response parts of http caching
* Implement cached response for static resources
* Implement HTTP caching for json responses
* Fix last seen value for online players
* Implement http caching for pages (.html)
* Use placeholder cache even with async requests.

Affects issues:
- Close #2813
2023-01-22 10:18:14 +02:00
Aurora Lahtela 8f239b010c
Add Swagger & Swagger UI (#2470)
* Adds swagger dependencies and annotations for json endpoints for documentation
* Add swagger ui to react project
* Access control to swagger endpoints
* Include swagger.json in jars using custom configuration

Also:
* Reworked project shadow configurations to avoid shadowing shadow versions of modules

Why: Extra dependencies were being included when using shadow scope

What:
- modules no longer depend on shadow configurations,
  which speeds up IDEA indexing after build considerably
  (No need to index *-all.jars)
- 'shadow' scope is now used for artifacts that need to be included
- 'shadow' scope is also 'api' so that modules that depend on common
  can import the libraries. This may cause issues in projects
  depending on Plan so this may need to be reconsidered
- Relocations and exclusions were moved to plugin module
  org.slf4j is now included in 2 locations which may cause issues.
  Needs testing with servers
- Found out that all Extension dependencies include junit as compile
  scope which caused it to be included.

Affects issues:
- Close #1890
2022-07-13 21:21:20 +03:00
Risto Lahtela bde57a0bdf Removed unnecessary parenthesis 2021-03-22 07:18:09 +02:00
Risto Lahtela 03782f18d5 Wrote an access control test for bypass checks
One bypass was discovered for detecting who has played on a server, where
403 is given for level 2 when user has played and 400 when they have not.
This was fixed.

One 500 error was discovered when the network has no proxy server, /v1/network/servers
ran into NullPointerException in a query.
2021-03-22 07:13:27 +02:00
Rsl1122 b5d07de18b Removed unused code 2020-03-14 12:39:55 +02:00