Skip to content

Commit

Permalink
#46 | Deploy with github
Browse files Browse the repository at this point in the history
  • Loading branch information
LuongXuanNhat committed Dec 9, 2023
1 parent 3b23ede commit 735a52b
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 45 deletions.
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"baseHref": "/VietNamHistory/",
"baseHref": "/VietNamHistory_FEweb/",
"allowedCommonJsDependencies": ["@ckeditor/ckeditor5-build-classic"],
"outputPath": "docs",
"index": "src/index.html",
Expand Down
6 changes: 3 additions & 3 deletions docs/index.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/styles.48fb634aba0d3813.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/styles.8137fd47bbcf7af2.css

This file was deleted.

73 changes: 39 additions & 34 deletions docs/web.config
Original file line number Diff line number Diff line change
@@ -1,38 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>

<system.webServer>
<rewrite>
<rules>
<rule name="Angular Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="./index.html" />
</rule>
</rules>
</rewrite>
<security>
<requestFiltering>
<fileExtensions>
<add fileExtension=".svg" allowed="true" />
<add fileExtension=".woff" allowed="true" />
<add fileExtension=".woff2" allowed="true" />
</fileExtensions>
</requestFiltering>
</security>

<httpProtocol>
<customHeaders>
<!-- <add name="X-Content-Type-Options" value="no-sniff"/>
<add name="X-Frame-Options" value="SAMEORIGIN"/>
<add name="X-Xss-Protection" value="1; mode=block"/>
<add name="Strict-Transport-Security" value="max-age=31536000; includeSubDomains"/> -->
</customHeaders>
</httpProtocol>
<httpRedirect enabled="false" destination="" />
</system.webServer>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".json" mimeType="application/json" />
<remove fileExtension=".woff"/>
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
</staticContent>
<rewrite>
<rules>
<rule name="Angular Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
<security>
<requestFiltering>
<fileExtensions>
<add fileExtension=".svg" allowed="true" />
<add fileExtension=".woff" allowed="true" />
<add fileExtension=".woff2" allowed="true" />
</fileExtensions>
</requestFiltering>
</security>

<httpProtocol>
<customHeaders>
<!-- <add name="X-Content-Type-Options" value="no-sniff"/>
<add name="X-Frame-Options" value="SAMEORIGIN"/>
<add name="X-Xss-Protection" value="1; mode=block"/>
<add name="Strict-Transport-Security" value="max-age=31536000; includeSubDomains"/> -->
</customHeaders>
</httpProtocol>
<httpRedirect enabled="false" destination="" />
</system.webServer>

</configuration>
2 changes: 1 addition & 1 deletion src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const routes: Routes = [
];

@NgModule({
imports: [RouterModule.forRoot(routes), HttpClientModule],
imports: [RouterModule.forRoot(routes, {useHash: true} ), HttpClientModule],
exports: [RouterModule],
providers: [
{
Expand Down
4 changes: 2 additions & 2 deletions src/app/service/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { Injectable } from '@angular/core';
export class AuthService {

constructor(private http: HttpClient ) { }
// apiurl = 'https://vuanhpham25-001-site1.gtempurl.com';
apiurl = 'https://localhost:7138';
apiurl = 'https://vuanhpham25-001-site1.gtempurl.com';
// apiurl = 'https://localhost:7138';
getApiUrl(){
return this.apiurl;
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>Tôi yêu lịch sử</title>
<base href="/">
<base href="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="assets/Icon/onepangoda.png">
<link rel="preconnect" href="https://fonts.gstatic.com">
Expand Down

0 comments on commit 735a52b

Please sign in to comment.