Skip to content

Not POSTing to Micropub endpoint #4

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

Open
skpy opened this issue Apr 23, 2018 · 5 comments
Open

Not POSTing to Micropub endpoint #4

skpy opened this issue Apr 23, 2018 · 5 comments

Comments

@skpy
Copy link

skpy commented Apr 23, 2018

I have been able to authenticate to my Micropub endpoint, but all attempts to create posts or notes fail. As far as my server logs can tell, it appears that Grumble is POSTing to /index.php, rather than /micropub/index.php. I have no idea how to diagnose or troubleshoot this any further, but am happy to supply any information you request.

@jjdelc
Copy link
Owner

jjdelc commented Nov 13, 2018

The discoverLink function will parse the HTML and look for a <link/> tag that has rel=micropub and return that URL https://github.com/jjdelc/grumble/blob/master/src/main.js#L1

It does it only one time and then it saves this config in the browser's localStorage. You could open the devtools panel and see the "Storages" pane and see what's under the urlDiscoveredLinks:... key.

@skpy
Copy link
Author

skpy commented Jun 27, 2019

The urlDiscoveredLinks storage does properly identify the Micropub endpoint that my site is returning. When I submit an item, Grumble appears to POST to an invalid URL:

1.2.3.4 - - [27/Jun/2019:09:56:24 -0400] "POST /grumble/src/null HTTP/2.0" 404 38

I have Grumble installed in /grumble. I can successfully Indieauth login. Why is it POSTing to null like that?

@jjdelc
Copy link
Owner

jjdelc commented Jun 27, 2019

yes that null is definitely a problem parsing. Grumble will parse the html and extract the micropub endpoint from the <link rel="micropub"/> tag. It doesn't suppor HTTP headers.

@jjdelc
Copy link
Owner

jjdelc commented Jul 9, 2019

@skpy did you check that you have CORS enabled on your domain?

@skpy
Copy link
Author

skpy commented Jul 12, 2019

I believe I set the headers correctly in my server, but that produced no change in behavior.

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

No branches or pull requests

2 participants