Last active
March 27, 2022 08:29
-
-
Save mowtschan/6df70414a77620078684d249ab98272e to your computer and use it in GitHub Desktop.
Enable CORS on GL.iNet GL-MT300N-V2 (OpenWrt, lighttpd)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh [email protected] | |
opkg update | |
opkg install lighttpd-mod-setenv | |
vim /etc/lighttpd/conf.d/30-setenv.conf | |
# --- | |
server.modules += ( "mod_setenv" ) | |
setenv.add-response-header = ( | |
"Access-Control-Allow-Origin" => "<PUT HERE YOUR SITE, DON'T USE *>", | |
"Access-Control-Allow-Headers" => "accept, origin, x-requested-with, content-type, x-transmission-session-id, Authorization") | |
# --- | |
service lighttpd reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment