Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge master into develop #1215

Merged
merged 21 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
46b65f4
Change route constants for authentication/authorization
IvannYad Jan 26, 2024
7518977
Merge pull request #1144 from ita-social-projects/develop
Oleh-Kril Jan 31, 2024
855b757
Merge pull request #1154 from ita-social-projects/develop
IvannYad Feb 20, 2024
f942d4c
Merge pull request #1156 from ita-social-projects/develop
BohdanBybliv Feb 20, 2024
ab8189b
Merge pull request #1158 from ita-social-projects/develop
IvannYad Feb 21, 2024
2f69b95
Merge pull request #1162 from ita-social-projects/develop
Oleh-Kril Feb 23, 2024
76166c2
Merge pull request #1167 from ita-social-projects/develop
BapBap7 Feb 26, 2024
8690c8f
Merge pull request #1172 from ita-social-projects/develop
IvannYad Feb 28, 2024
b0c8c58
Update docker-compose.yml
LanchevychMaxym Mar 6, 2024
f3c5e49
Merge pull request #1182 from ita-social-projects/feature/added-docke…
LanchevychMaxym Mar 6, 2024
d066d35
Merge pull request #1183 from ita-social-projects/develop
IvannYad Mar 8, 2024
fbbfdcb
Merge pull request #1189 from ita-social-projects/develop
IvannYad Mar 12, 2024
6abf74a
Update default.conf.template
MaksymukNatalia Mar 12, 2024
ab4f556
Merge pull request #1191 from ita-social-projects/develop
IvannYad Mar 13, 2024
f6fc708
Merge pull request #1192 from ita-social-projects/develop
IvannYad Mar 13, 2024
31c52d5
add a limit to the number of messages
BohdanBybliv Mar 13, 2024
8e07831
Merge pull request #1190 from ita-social-projects/feature/issue-1262
MaksymukNatalia Mar 19, 2024
a25140a
Update docker-compose.yml
IvannYad Mar 19, 2024
e6a2e89
Merge pull request #1204 from ita-social-projects/feature/change-dock…
IvannYad Mar 19, 2024
5fc9fba
Merge pull request #1193 from ita-social-projects/bugfix/fix-recaptch…
IvannYad Mar 19, 2024
d3be624
Merge pull request #1142 from ita-social-projects/rewrite-authorizati…
IvannYad Mar 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ services:
STREETCODE_Payment__Token: ${PAYMENT_TOKEN}
STREETCODE_EMAILCONFIGURATION__PASSWORD: ${EMAIL_PASSWORD}
STREETCODE_RECAPTCHA__SECRETKEY: ${RECAPTCHA_SECRET_KEY}
STREETCODE_CORS__AllowedOrigins: '["*"]'
STREETCODE_CORS__AllowedHeaders: '["*"]'
STREETCODE_CORS__AllowedMethods: '["*"]'
STREETCODE_CORS__PreflightMaxAge: 1
STREETCODE_CORS__AllowedOrigins: ${CORS_ALLOWED_ORIGINS}
STREETCODE_CORS__AllowedHeaders: ${CORS_ALLOWED_HEADERS}
STREETCODE_CORS__AllowedMethods: ${CORS_ALLOWED_METHODS}
STREETCODE_CORS__ExposedHeaders: ${CORS_EXPOSED_HEADERS}
STREETCODE_CORS__PreflightMaxAge: "600"
STREETCODE_IPRATELIMITING__GENERALRULES__0__LIMIT: 500
ASPNETCORE_ENVIRONMENT: ${SWAGGER_APP_ENVIRONMENT}
volumes:
Expand All @@ -81,6 +82,8 @@ services:
interval: 30s
timeout: 10s
retries: 5
extra_hosts:
- "host.docker.internal:host-gateway"
logging:
driver: loki
options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface Props {
const ContactForm = forwardRef((customClass: Props, ref) => {
const [formData, setFormData] = useState({ email: '', message: '' });
const [isVerified, setIsVerified] = useState(false);
const [messageApi, messageContextHolder] = message.useMessage();
const [messageApi, messageContextHolder] = message.useMessage({maxCount: 3});
const [form] = Form.useForm();
const recaptchaRef = useRef<ReCAPTCHA>(null);
const siteKey = window._env_.RECAPTCHA_SITE_KEY;
Expand All @@ -30,6 +30,10 @@ const ContactForm = forwardRef((customClass: Props, ref) => {
setIsVerified(true);
};

const handleExpiration = () => {
setIsVerified(false);
};

useImperativeHandle(ref, () => ({
clearModal() {
form.resetFields();
Expand Down Expand Up @@ -133,6 +137,7 @@ const ContactForm = forwardRef((customClass: Props, ref) => {
className="required-captcha"
sitekey={siteKey ? siteKey : ""}
onChange={handleVerify}
onExpired={handleExpiration}
ref={recaptchaRef}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const PartnersModal = () => {
const { setModal, modalsState: { partners } } = modalStore;
const [form] = Form.useForm();
const [formData, setFormData] = useState({ email: '', message: '' });
const [messageApi, messageContextHolder] = message.useMessage();
const [messageApi, messageContextHolder] = message.useMessage({maxCount: 3});
const [isVerified, setIsVerified] = useState(false);
const recaptchaRef = useRef<ReCAPTCHA>(null);
const siteKey = window._env_.RECAPTCHA_SITE_KEY;
Expand Down Expand Up @@ -72,6 +72,10 @@ const PartnersModal = () => {
setIsVerified(true);
};

const handleExpiration = () => {
setIsVerified(false);
};

const successMessage = () => {
messageApi.open({
type: 'success',
Expand Down Expand Up @@ -174,6 +178,7 @@ const PartnersModal = () => {
className="required-input"
sitekey={siteKey ? siteKey : ""}
onChange={handleVerify}
onExpired={handleExpiration}
ref={recaptchaRef}
/>
</div>
Expand Down
5 changes: 3 additions & 2 deletions src/app/common/constants/api-routes.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,9 @@ export const API_ROUTES = {
DELETE: 'coordinate/delete',
},
USERS: {
LOGIN: 'user/login',
REFRESH_TOKEN: 'user/refreshToken',
LOGIN: 'auth/login',
REFRESH_TOKEN: 'auth/refreshToken',
REGISTER: 'auth/register',
},
EMAIL: {
SEND: 'email/send',
Expand Down
22 changes: 16 additions & 6 deletions templates/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,38 @@ server {
listen 80;
listen [::]:80;

server_name $FRONTEND_SERVER_NAME;
server_name $FRONTEND_SERVER_NAME www.$FRONTEND_SERVER_NAME;
server_tokens off;

location /.well-known/acme-challenge/ {
root /var/www/certbot;
}

return 301 https://$FRONTEND_SERVER_NAME;

location / {
return 301 https://$FRONTEND_SERVER_NAME$request_uri;
}
}

server {
listen 80;
listen [::]:80;

server_name $BACKEND_SERVER_NAME;
server_name $BACKEND_SERVER_NAME www.$BACKEND_SERVER_NAME;
server_tokens off;


location /.well-known/acme-challenge/ {
root /var/www/certbot;
}

return 301 https://$BACKEND_SERVER_NAME;


location / {
return 301 https://$BACKEND_SERVER_NAME$request_uri;
}
}


server {
listen 443 ssl http2;
server_name $FRONTEND_SERVER_NAME;
Expand Down Expand Up @@ -61,4 +71,4 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}
Loading