micropub.rocks icon indicating copy to clipboard operation
micropub.rocks copied to clipboard

Show a warning when a CORS request is made to the client

Open aaronpk opened this issue 8 years ago • 9 comments

warn that not all Micropub endpoints will support CORS

aaronpk avatar Mar 13 '17 02:03 aaronpk

Seems like the CORS header is currently completely missing from the client tests, I see a CORS error with my micro-panel in standalone mode instead of a warning from micropub.rocks…

valpackett avatar May 05 '17 19:05 valpackett

That's strange, it's setting them here: https://github.com/aaronpk/micropub.rocks/blob/master/app/ClientTests.php#L1613

What error specifically? Did I leave out a header? Also I was pretty sure I had tested this with a javascript client already.

aaronpk avatar May 05 '17 19:05 aaronpk

Is that function called on the client page? Not seeing the header:

2017-05-05 22_48_02-micropanel - nightly

valpackett avatar May 05 '17 19:05 valpackett

ooh it's not! Are you hitting that when you're signing in?

aaronpk avatar May 05 '17 19:05 aaronpk

Yep, when requesting /client/… to discover endpoints

valpackett avatar May 05 '17 19:05 valpackett

Okay, I just added them there. Try now!

aaronpk avatar May 05 '17 19:05 aaronpk

Okay, it's there :) Would be nice to also get the endpoints in a Link header, I haven't implemented finding them in HTML…

valpackett avatar May 05 '17 19:05 valpackett

Yeah I can do that. Can you make a new issue for it?

aaronpk avatar May 05 '17 19:05 aaronpk

done

valpackett avatar May 05 '17 20:05 valpackett