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

Run with SpringTemplateEngine #385

Open
vandykej17 opened this issue Jul 17, 2023 · 1 comment
Open

Run with SpringTemplateEngine #385

vandykej17 opened this issue Jul 17, 2023 · 1 comment
Assignees
Labels
✨ enhancement New feature request

Comments

@vandykej17
Copy link

Is your feature request related to a problem? Please describe.
This is kind of a bug, but also a feature. We are seeing the thymeleaf tag engine is not doing normal "spring things" like CSRF tags. I tracked this down to the FF4J servlet explicitly calling out to use the TemplateEngine instead of SpringTemplateEngine. I understand not everyone using ff4j-web is using spring, so this is a feeler on how we can make this work for both Spring users and non-Spring users.

https://github.com/ff4j/ff4j/blob/main/ff4j-web/src/main/java/org/ff4j/web/FF4jServlet.java#L180

Describe the solution you'd like
I'd like the ff4j spring boot config to use the SpringTemplateEngine so it auto-injects the CSRF tokens. I assume this would possibly require a change in the ff4j-web project to allow such customization. With that said, it doesn't seem too far-fetched to allow a runtime config for which template engine to use.

Describe alternatives you've considered
I have a hacky workaround right now doing a sed command in my Dockerfile and adding the CSRF hidden inputs in.

Thanks!

@vandykej17
Copy link
Author

Forgot to put this above... This is the feedback I received from the ff4j-web project.
ff4j/ff4j#687

@paul58914080 paul58914080 self-assigned this Jul 22, 2023
@paul58914080 paul58914080 added the ✨ enhancement New feature request label Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature request
Projects
None yet
Development

No branches or pull requests

2 participants