Skip to content
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

feat: serve static assets, support wildcard path in routes #526

Merged
merged 5 commits into from
Aug 30, 2023

Conversation

tommytroen
Copy link
Collaborator

@tommytroen tommytroen commented Aug 23, 2023

  • breaking change in API: static assets directory can be configured in OAuth2Config
  • in order to serve arbitrary files we must support wildcard paths in routes, support * for now which will be translated to regex .* - see OAuth2HttpRequestHandler.staticAssets() and OAuth2HttpRouter.routFromPathAndMethod()
  • breaking change in API: add byteBody to OAuth2HttpResponse in order to be able to serve binary files such as images etc
  • implement support for ByteArray in http servers MockWebServerWrapper and NettyWrapper
  • add examples assets to login.example.html, assets will have to be referenced by using /static/yourfilehere

* let static assets directory be configured in OAuth2Config
* in order to serve arbitrary files we must support wildcard paths in routes, support * for now which will be translated to regex .*
* breaking change: add byteBody to OAuth2HttpResponse in order to be able to serve binary files such as images etc
* implement support for ByteArray in http servers MockWebServerWrapper and NettyWrapper
* add examples assets to login.example.html, assets will have to be referenced by using /static/yourfilehere
@tommytroen tommytroen requested a review from a team as a code owner August 23, 2023 08:49
@tommytroen
Copy link
Collaborator Author

fixes #513

@tommytroen tommytroen linked an issue Aug 23, 2023 that may be closed by this pull request
@tommytroen tommytroen added enhancement New feature or request breaking breaking changes, i.e. non backwards compatible api changes labels Aug 23, 2023
Copy link
Contributor

@ybelMekk ybelMekk left a comment

Choose a reason for hiding this comment

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

LGTM 🚢 it

@tommytroen tommytroen merged commit 1bf5837 into master Aug 30, 2023
1 check passed
@tommytroen tommytroen deleted the static_assets branch August 30, 2023 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking breaking changes, i.e. non backwards compatible api changes enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP 405 Method Not Allowed for custom CSS and JavaScript files.
2 participants