silent icon indicating copy to clipboard operation
silent copied to clipboard

Try to supprot local debug without serve environment.Just make it support file: protocol!

Open jacsonLee opened this issue 11 years ago • 3 comments

jacsonLee avatar Oct 28 '14 03:10 jacsonLee

@jacsonLee thanks.

XMLHttpRequest cannot load file:///F:/dev/blog/p/sidebar.md. Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https, chrome-extension-resource.
XMLHttpRequest cannot load file:///F:/dev/blog/p/diary.md. Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https, chrome-extension-resource.

To get contents of markdown files, our blog app sends ajax requests, which are, for security purpose, disabled in Chrome under file:// protocol.

Usually, we have to setup a "server environment", as you mentioned, so we can visit the site under http:// protocol, etc.

fritx avatar Oct 28 '14 03:10 fritx

Got it now! Thanks @fritx

jacsonLee avatar Oct 28 '14 03:10 jacsonLee

I am still wondering if we could use file:// to view the blog :beers: But seems impossible, since it is really a security problem guarded by Chrome.

fritx avatar Oct 28 '14 04:10 fritx