I
I
Igor Agarkov2017-12-21 17:16:00
CORS
Igor Agarkov, 2017-12-21 17:16:00

How to send "Access-Control-Allow-Origin" header?

There is a client and a server (all under my control). The client uses JavaScript to download information from the server. The server gives the client an HTML page that has link tags that connect styles to the page, and fonts are connected in these styles. Style files and fonts are located on the server. Styles are connected by an absolute reference. But they don't connect :D, that's because Access to Font has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
This already happened when the page was rendered: then everything was decided by sending the header from the php script. But what about now?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
roswell, 2017-12-21
@id01

If you have Apache HTTPd, then in .htaccess arrange via Header , if nginx, then add_header in the appropriate section.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question