I have small ajax problem related to cross domain as i see it.
On localmachine i created html example with some ajax: in registration text field user types \'username\',
For me, It was web api(c# .NET) request and cors was not enabled. Added header for cors on controller and it solved the problem.
[EnableCors(origins: "*", headers: "*", methods: "*")]