mirror of
https://github.com/neocities/neocities.git
synced 2025-07-19 17:16:05 +02:00
allow api use via current_site, better check for current_site
This commit is contained in:
parent
b89ffc2bad
commit
59dbc1b2e1
5 changed files with 23 additions and 36 deletions
|
@ -183,6 +183,8 @@ post '/api/:name' do
|
|||
end
|
||||
|
||||
def require_api_credentials
|
||||
return true if current_site
|
||||
|
||||
if !request.env['HTTP_AUTHORIZATION'].nil?
|
||||
init_api_credentials
|
||||
api_error(403, 'email_not_validated', 'you need to validate your email address before using the API') if email_not_validated?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue