-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add ability to get JSON data containing URL #86
Conversation
I really like this change. I will review it entirely and test it out this week. Thank you for your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get a large portion of HTML/CSS back when using json=true
. Perhaps you're returning the JSON a little too late in the process.
$ curl -s -X POST -d "secret=foobar&json=true&submit=" https://internal-testing-instance/
<!DOCTYPE html>
<html lang="en">
[... html/css removed ...]{"url":"http:\/\/internal-testing-instance\/?k=dMGiKCM0oAK8R1INkHbOY8QzdeYkJbJtXoQfUvzE"}
Oh it's probably because it still loads the header in this case |
Should be fixed now (pretty sure) |
I think we can simplify your change a bit by doing something like the following. Towards the top of
Below in
Later in the
This also enables us to remove the |
@DarkKronicle It looks like there hasn't been any movement on this PR for ~3 weeks. Would you like me to finish it up for you, or are you planning on completing the changes I posted in my last message? |
This adds a simple page that returns
$message
in the JSON format{ "url": "<generated_url>" }
Resolves #85
Example of use: