feat(API): add new api for use in another project
This commit is contained in:
@@ -8,5 +8,10 @@ RewriteCond %{REQUEST_METHOD} GET [OR]
|
||||
RewriteCond %{REQUEST_METHOD} POST
|
||||
RewriteRule ^view/([a-f0-9]+)/?$ view.php?id=$1 [L,QSA]
|
||||
|
||||
# REST API routes
|
||||
RewriteRule ^api/paste/([a-f0-9]+)/unlock/?$ api.php?id=$1&action=unlock [L,QSA]
|
||||
RewriteRule ^api/paste/([a-f0-9]+)/?$ api.php?id=$1&action=get [L,QSA]
|
||||
RewriteRule ^api/paste/?$ api.php?action=create [L,QSA]
|
||||
|
||||
# Block direct access to .env and sensitive files
|
||||
RewriteRule ^(\.env|\.git) - [F,L]
|
||||
|
||||
Reference in New Issue
Block a user