Welcome Guest, Not a member yet? Register   Sign In
ci3 cors doesn't works
#4

Not sure why your still getting an error maybe something with the server configuration.

I run all my cors stuff in my .htaccess file.


.htaccess:

Code:
    # Add Font Types
       AddType application/vnd.ms-fontobject .eot
       AddType application/x-font-ttf        .ttf
       AddType application/x-font-opentype   .otf
       AddType application/font-woff         .woff
       AddType application/font-woff2        .woff2

       # Add Image Types
       AddType image/svg+xml .svg .svgz .jpg .png .ico

       <IfModule mod_headers.c>
           <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|svg|svgz|jpg|png|ico|font.css|css|js)$">
               #Header set Access-Control-Allow-Origin "*"
               Header add Access-Control-Allow-Origin: "https://admin.local/"
            Header add Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT"
            Header add Access-Control-Allow-Headers: "Upgrade-Insecure-Requests"
           </FilesMatch>
       </IfModule>

That's how I do mine but I'm running apache sever.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
ci3 cors doesn't works - by ultegro778 - 11-29-2020, 11:47 AM
RE: ci3 cors doesn't works - by InsiteFX - 11-30-2020, 12:16 PM
RE: ci3 cors doesn't works - by ultegro778 - 12-02-2020, 12:35 PM
RE: ci3 cors doesn't works - by InsiteFX - 12-02-2020, 10:36 PM
RE: ci3 cors doesn't works - by tgix - 12-03-2020, 03:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB