/ucengine/src/helpers/cors_helpers.erl
Erlang | 29 lines | 6 code | 2 blank | 21 comment | 0 complexity | a9cd52346f30fc2b72f3c0ce157c224c MD5 | raw file
- %%
- %% U.C.Engine - Unified Collaboration Engine
- %% Copyright (C) 2011 af83
- %%
- %% This program is free software: you can redistribute it and/or modify
- %% it under the terms of the GNU Affero General Public License as published by
- %% the Free Software Foundation, either version 3 of the License, or
- %% (at your option) any later version.
- %%
- %% This program is distributed in the hope that it will be useful,
- %% but WITHOUT ANY WARRANTY; without even the implied warranty of
- %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- %% GNU Affero General Public License for more details.
- %%
- %% You should have received a copy of the GNU Affero General Public License
- %% along with this program. If not, see <http://www.gnu.org/licenses/>.
- %%
- -module(cors_helpers).
- -export([format_cors_headers/1]).
- %%
- %% Add Access-Control-Allow-Origin header
- %% Currently we allow cross domain requests from all hosts
- %%
- format_cors_headers(_Domain) ->
- [{header, "Access-Control-Allow-Origin: *"},
- {header, "Access-Control-Allow-Methods: GET, POST, PUT, DELETE"},
- {header, "Access-Control-Allow-Headers: X-Requested-With"}].