Last active
July 14, 2017 08:32
-
-
Save schulzh/a81932c2c8d05d738f0c to your computer and use it in GitHub Desktop.
A secure .htaccess file for source servers which accounts for the missing referer field of linux/mac csgo clients
This file contains 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
SetEnvIfNoCase User-Agent "^Half-Life 2$" is_hl2 | |
# Workaround for Mac OSX and Linux Clients, see https://github.com/ValveSoftware/csgo-osx-linux/issues/177 | |
SetEnvIf Referer "^$" valid_ref | |
SetEnvIfNoCase Referer "^hl2:\/\/ip\.of\.first\.server:27015$" valid_ref | |
SetEnvIfNoCase Referer "^hl2:\/\/ip\.of\.second\.server:27015$" valid_ref | |
<RequireAll> | |
Require env is_hl2 | |
Require env valid_ref | |
</RequireAll> | |
Options -Indexes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment