current shop changes
This commit is contained in:
@@ -2,9 +2,17 @@ class Api::ApiController < ActionController::API
|
||||
include TokenVerification
|
||||
include ActionController::MimeResponds
|
||||
|
||||
# before_action :lookup_domain
|
||||
before_action :core_allow
|
||||
helper_method :current_token, :current_login_employee, :get_cashier
|
||||
|
||||
|
||||
def core_allow
|
||||
headers['Access-Control-Allow-Origin'] = '*'
|
||||
headers['Access-Control-Allow-Methods'] = 'POST, PUT, DELETE, GET, OPTIONS'
|
||||
headers['Access-Control-Request-Method'] = '*'
|
||||
headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept, Authorization'
|
||||
end
|
||||
|
||||
private
|
||||
#this is base api base controller to need to inherit.
|
||||
#all token authentication must be done here
|
||||
|
||||
Reference in New Issue
Block a user