• Skip to primary navigation
  • Skip to content
  • Skip to footer
Wannabe Exceptional
  • About
  • Slides

    CORS in Apache2

    How to enable CORS

    less than 1 minute read

    Jan Peter Alexander

    Jan Peter Alexander

    There is nothing certain than the uncertainty itself. Capture, learn and mitigate. Welcome!

    • Planet Earth
    • Website
    • Twitter
    • Facebook
    • Instagram
    • Tumblr
    • GitHub
    • Last.fm
    • Steam
    • YouTube
    • Soundcloud

    Browser keep stricter each days. Now, they insist on CORS. I can’t enable it in .htaccess, must do it in sites-enabled.

    <IfModule mod_headers.c>
      <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
        Header set Access-Control-Allow-Origin "*"
      </FilesMatch>
    </IfModule>
    

    Further Read

    Access-Control-Allow-Origin Multiple Origin Domains?

    Tags: apache2, cors, site

    Categories: apache2, linux, tips

    Updated: January 5, 2017

    Twitter Facebook LinkedIn
    Previous Next

    You May Also Enjoy

    Generate 32 Random Characters

    less than 1 minute read

    Generate Random Characters

    Setup PHP, Composer, and Laravel

    less than 1 minute read

    Installing Laravel in my PC

    Setup Gowebly

    less than 1 minute read

    Install degit

    HATEOAS with Bun, Hono, DaisyUI and RSBuild

    10 minute read

    Building backend and frontend architecture with HATEOAS concept.

    • Feed
    © 2025 Wannabe Exceptional. Powered by Jekyll & Minimal Mistakes.