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

Fix: set Content-type to JSON #2599

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

arminfelder
Copy link

@arminfelder arminfelder commented Dec 5, 2024

Sets the content-type to application/json

solves issues with modsecurity

Fixes #2600

@jhaals
Copy link
Owner

jhaals commented Dec 12, 2024

Thanks for this @arminfelder!
Just needs a small format to be able to merge :)
See https://github.com/jhaals/yopass/actions/runs/12187426977/job/34309743381?pr=2599

Signed-off-by: Armin Felder <[email protected]>
@arminfelder
Copy link
Author

@jhaals I did a reformat and rebase, should be fine now

@jhaals
Copy link
Owner

jhaals commented Dec 18, 2024

Thanks for the rebase. I was just about to merge this but I realized that the OPTIONS call fails for the preview build. It's probably the case that the /secret endpoint need to support OPTIONS as well https://github.com/jhaals/yopass/blob/master/pkg/server/server.go#L150

adds config option for Access-Control-Allow-Origin
@arminfelder
Copy link
Author

@jhaals I just added implementations for OPTIONS method calls + a config option to override the default '*'
the question is, if we should do this together in this pull request or split it up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] invalid content type for post request
2 participants