File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ # This file is part of MoonScript
2+ #
3+ # MoonSript is free software: you can redistribute it and/or modify
4+ # it under the terms of the GNU General Public License as published by
5+ # the Free Software Foundation, either version 3 of the License, or
6+ # (at your option) any later version.
7+ #
8+ # MoonSript is distributed in the hope that it will be useful,
9+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ # GNU General Public License for more details.
12+ #
13+ # You should have received a copy of the GNU General Public License
14+ # along with MoonSript. If not, see <https://www.gnu.org/licenses/>.
15+ #
16+ # Copyright (C) 2025 Krisna Pranav, MoonScript Developers
17+
18+ module MoonScript
19+ class CORS
20+ include HTTP ::Handler
21+
22+ def call (context )
23+ context.response.headers[" Accept-Control-Max-Age" ] = 1 .day.total_seconds.to_i.to_s
24+ context.response.headers[" Acccess-Control-Allow-Method" ] = " GET, POSt, PUT, PATCH"
25+ end
26+ end
27+ end
You can’t perform that action at this time.
0 commit comments